Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've created a user called "user". I want this user to be able to login to ssh using an SSH Key.

I have done the following:

  • created a folder called .ssh inside /home/user and chmoded it to 700
  • created a file called authorized_keys inside /home/user/.ssh/ and chmoded it to 600
  • added the public key i generated with puttygen into the authorized_keys file
  • restarted ssh

Now when I try to login to with the private key generated with puttygen I get that error server refused our key and disconnected: no supported authentication methods available (server sent: publickey)

When I did this for the user root it worked fine, what am I doing wrong here?

share|improve this question
Does user own his home folder and all its contents? – Dennis Feb 25 '14 at 2:57
Yes user owns /home/user and everything inside it – Kent Feb 25 '14 at 3:56
After giving the user user a password it worked. – Kent Feb 25 '14 at 4:10

PuttyGen usually create a public key starting with:


I solved this opening the key in PuttyGen and copying it from there. It looks like:

ssh-rsa BBBBBBBojojoj...= rsa-key-20140225

After adding this key to the public keys and restarting the server, it should work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.