by userbinator · 10y ago · 0 comments
If I use a password, a suitably designed client can have absolutely no trace of my credential after it has been used.
If I use a key/certificate, that credential must be stored somewhere on the client, and even in encrypted form, it exists in persistent storage.
The fact that a private key file exists suggests that the user is very likely to be using SSH regularly.
The fact that an SSH client exists is far less informational (there's one by default on most Linuxes and Mac OS).
If I only ever use password authentication with SSH and don't save anything else, not even server keys, the attacker has far less information. That might be important in some scenarios, especially related to anonymity.
(I get the feeling I'm missing something here, but...)
Sometimes the best way to make something secure, is to make it look like there is actually nothing to secure.
If you can't trust your client device, you probably have bigger issues with either method - for instance, can you trust that the client is not logging all keystrokes?
Setting a passphrase on your key file is also actually widely considered a "best practice" and "conventional wisdom" ... so maybe those old guys knew something after all...
If your argument is that your client is untrusted, then typing in your password is a lot more risky than generating a fresh key pair.
If your laptop get stolen, then just remove the corresponding line in your authorized_keys file.
Do you frequently use a computer that you don't control?
But password requirements in this case are definitely higher. You can restrict login attempts in the remote ssh machine, but you can't restrict bruteforcing of stolen encrypted key.