Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

This question already has an answer here:

I read an article and found it very useful: http://www.howtoforge.com/ssh_key_based_logins_putty

I made two key pairs for root and the other user. But it only works for root

When it comes to the other one, the server shows:

Using username "theotheruser".
Server refused our key
theotheruser@mydomain.com's password:
share|improve this question

marked as duplicate by Gilles, slm, Renan, jasonwryan, Anthon Aug 19 '13 at 1:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 2 down vote accepted

Check permissions for the ~/.ssh directory for user and all files in it. The ~/.ssh directory should have permissions 700, while files should have permissions 600

share|improve this answer
Also check the permissions on all directories in the path. They should be writable only by the owner. – BillThor Aug 18 '13 at 14:39

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