3 ms·
There seems to be confusion about the purpose of one-time authentication; the purpose is to protect against key leaks after the key has been used. For instance,
by DblPlusUngood 11y ago
There seems to be confusion about the purpose of one-time authentication; the purpose is to protect against key leaks after the key has been used. For instance, suppose I want to SSH to my machine from an Internet cafe but am concerned the key will eventually found by someone after me.
SSH in fact already has support for one time passwords: skey. See http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/otp-md5.1?query=skey&sec=1 http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/...
- nadams 11y agoGoogle also created a PAM module for OTP [1]. [1] https://github.com/google/google-authenticator https://github.com/google/google-authenticator
- TD-Linux 11y agoThere's one for Yubikeys too, which I like because there's no battery to die.
- akerl_ 11y agoOne of the key benefits of asymmetric crypto is that your private portion isn't sent over the wire to authenticate, so it doesn't matter if you're using the key from an internet cafe or the NSA headquarters or your bomb shelter in the hills, your risk of the key being compromised while it's being transmitted over the wire is roughly the same: nil. The risk to the private key is that somebody gets access to your system without your knowledge, but since you need a way to auth to the remote system for this script to put the one-time keys there... what stops the attacker from grabbing the not-one-time key or other creds? If I really wanted some kind of rotating key-based-auth, I'd probably do it via some mechanism where the server pulled valid keys. Offhand, using sshd_config's AuthenticationMethod combined with some GPG signed pubkey lists hosted somewhere, such that it could pull a list of one-time pubkeys and then nix them as they were used. Upside there: as others have pointed out in this thread, a big issue for this is that a non-root user typically can write to their own .ssh/authorized_keys, negating the "one-time" nature of this access. Moving the pubkey-checking outside of their control would limit that, local priv-esc vulns aside.