RSA Authentication: Cannot get passwordless login with SSH

rsassh

I have set up my computer to do the public/private authentication with a remote server, but somehow it is not working today.

I have done the ssh key-gen -t rsa, then scp'd it to the remote.

I can scp without a password (using the pub/priv key), but whenever I try to SSH, it requests the password.

What can I do to authenticate on the key alone?

Best Answer

You should check if you have (sshd_config) :

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      %h/.ssh/authorized_keys

UsePAM yes  <-- That one is usually the last line of the sshd_config

Then that your public key is added to authorized_keys in your ~/.ssh/. The last one (UsePAM yes) is very important, since if disabled it will force you to authenticate with your unix account. PAM is here to say that private key authentication is sufficient to log in. Eventually, if that still don't resolves you may have to check the PAM configuration.

Related Question