FreeBSD Handbook : Security : S/Key : Generating multiple one-time passwords
Previous: Generating a single one-time password
Next: Restricting use of UNIX passwords

6.2.5. Generating multiple one-time passwords

Sometimes we have to go places where no trusted machines or connections are available. In this case, it is possible to use the `key' command to generate a number of one-time passwords in the same command; these can then be printed out. For example:

$ key -n 25 57 zz99999
Reminder - Do not use this program while logged in via telnet or rlogin.
Enter secret password: 
33: WALT THY MALI DARN NIT HEAD  
34: ASK RICE BEAU GINA DOUR STAG 
[...]
56: AMOS BOWL LUG FAT CAIN INCH  
57: GROW HAYS TUN DISH CAR BALM  

The `-n 25' requests twenty-five keys in sequence; the `57' indicates the ending iteration number; and the rest is as before. Note that these are printed out in reverse order of eventual use. If you are really paranoid, you might want to write the results down by hand; otherwise you can cut-and-paste into `lpr'. Note that each line shows both the iteration count and the one-time password; you may still find it handy to scratch off passwords as you use them.


FreeBSD Handbook : Security : S/Key : Generating multiple one-time passwords
Previous: Generating a single one-time password
Next: Restricting use of UNIX passwords