Karim Akhnoukh
Karim Akhnoukh

Reputation: 101

Still getting password prompt after configuring ssh keys

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

Answers (3)

athavan kanapuli
athavan kanapuli

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

dAm2K
dAm2K

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

Hankster
Hankster

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

Related Questions