Public Key Authentication
I completed all the steps, but when I try to connect afterwards, it just asks for the user and then the password like logging in normally, not the passphrase like the article says should happen. The steps are all pretty straight forward, and I've checked over all the steps several times, but I'm clearly missing something since it's not working. Any ideas what I should check?
4 Replies
1. Check the permissions on your private key (~/.ssh/idrsa or ~/.ssh/iddsa) - OpenSSH will refuse to use it if these are incorrect. It should have read/write permissions for the owner only, like so:
$ ls -l ~/.ssh/id_rsa
-rw------- 1 vance vance 951 Aug 24 23:45 id_rsa
2. Use the verbose switch when logging in to produce additional diagnostics. For example:
ssh -vv user@host
I tried the verbose switch you mentioned, but it listed a fair bit of information and I'm not really sure what I'd be looking for in it. Is there something specific in there I should be looking for?
On the private key, I'm connecting from Windows using PuTTY, but the permissions Vance listed weren't for Windows (that's why I checked the public key, I saw Linux style permissions and just checked the remote Linux server without realizing the post said private key). The article I was following was specifically for PuTTY and didn't list needing to do anything for the private key other than generating it, saving it, and setting the location for it in PuTTY.