Passwordless login to SSH using keys

So you followed the excellent guide over at http://www.csua.berkeley.edu/~ranga/notes/ssh_nopass.html to setup so you can SSH to your server without entering your password everytime, by using a public/private keypair. However, it's still not working, still asking for a password. Why is this? Well, your situation may be different, but for one server I had the problem was the permissions. SSH would only allow a connection if both the authorized_keys file AND the .ssh directory were both set to chmod 700. The authorized_keys files usually gets created this way, but the .ssh directory in your home directory doesn't necessarily. So make sure to chmod 700 ~/.ssh/ and you should hopefully be good to go.

Add new comment

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Comment using an existing account (Google, Twitter, etc.)