Reputation: 101
I am trying to connect to a remote server without a password and i followed the instructions on this link exactly (http://kb.mediatemple.net/questions/1626/Using+SSH+keys+on+your+server) , I also checked the sshd_config file
SAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
However i still get password prompt when i try to log in. Any help ?
Upvotes: 0
Views: 1677
Reputation: 492
This is simple problem due to ~/.ssh/authorized_keys file permission. By default the mode will be set to 664 when you create the file manually. Change the mode to 600 and you can login without password
sudo chmod 700 ~/.ssh
sudo chmod 600 ~/.ssh/authorized_keys
Now try ssh into the server
Upvotes: 1
Reputation: 10329
Check for your ~/.ssh directory and/or id_rsa/id_dsa file permissions. Your ~/.ssh directory should be 700 and your private key files should be 600.
Upvotes: 3
Reputation: 422
The security log on your system (e.g. /var/log/secure) will often help you in determining what it objects to in using your keys. Please check that log for some clues.
Upvotes: 0