skey(1)

skey1

Respond to an otp challenge

Usage

skey [-x] [{-md5 | -rmd160 | -sha1}] [-n count] [-p passphrase] ⟨sequence#⟩ [/] key

Overview

S/Key is a procedure for using one-time passwords to authenticate access to computer systems. It uses 64 bits of information transformed by the MD5, RIPEMD-160, or SHA1 algorithms. The user supplies the 64 bits in the form of 6 English words that are generated by a secure computer. This implementation of S/Key is RFC 2289 compliant.

Before using skey, the system needs to be initialized using skeyinit(1); this will establish a secret passphrase. After that, one-time passwords can be generated using skey, which will prompt for the secret passphrase. After a one-time password has been used to log in, it can no longer be used.

When skey is invoked as otp-method, skey will use method as the hash function where method is currently one of md5, rmd160, or sha1.

If you misspell your secret passphrase while running skey, you will get a list of one-time passwords that will not work, and no indication of the problem.

Password sequence numbers count backwards. You can enter the passwords using small letters, even though skey prints them capitalized.

The options are as follows:

-md5 | -rmd160 | -sha1

Selects the hash algorithm: MD5, RMD-160 (160-bit Ripe Message Digest), or SHA1 (NIST Secure Hash Algorithm Revision 1).

-n count

Prints out count one-time passwords. The default is to print one.

-p passphrase

Uses passphrase as the secret passphrase. Use of this option is discouraged as your secret passphrase could be visible in a process listing.

-x

Causes output to be in hexadecimal instead of ASCII.

Examples

$ skey 99 th91334
Enter secret passphrase: your secret passphrase is entered here
OMEN US HORN OMIT BACK AHOY
$

Trademarks and patents

S/Key is a Trademark of Bellcore.

Releases

61 releases since OpenBSD 2.1; the text changed 17 times.

  1. 2.1
  2. 2.2
  3. 2.3
  4. 2.4
  5. 2.5
  6. 2.6
  7. 2.7–2.8
  8. 2.9
  9. 3.0–3.3
  10. 3.4–3.5
  11. 3.6–3.7
  12. 3.8–4.1
  13. 4.2–5.2
  14. 5.3–5.5
  15. 5.6
  16. 5.7–5.8
  17. 5.9–7.0
  18. 7.1–8.0

-rmd160 since OpenBSD 2.2.

-md4 until OpenBSD 5.5.

Standards

N. Haller, C. Metz, P. Nesser, and M. Straw, A One-Time Password System, RFC 2289, February 1998.

Authors

Phil Karn Neil M. Haller John S. Walden Scott Chasin

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.