Server Fault is a question and answer site for system and network administrators. 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

I've been using public key authentication on a remote server for some time now for remote shell use as well as for sshfs mounts. After forcing a umount of my sshfs directory, I noticed that ssh began to prompt me for a password. I tried purging the remote .ssh/authorized_keys from any mention the local machine, and I cleaned the local machine from references to the remote machine. I then repeated my ssh-copy-id, it prompted me for a password, and returned normally. But lo and behold, when I ssh to the remote server I am still prompted for a password. I'm a little confused as to what the issue could be, any suggestions?

share|improve this question
2… I'm not sure what StackExchange policy on duplicates across sites is, but it doesn't seem to me that cross-posting a question would be helpful. – ephemient Dec 2 '10 at 7:04
ssh-copy-id usually takes care of the correct file permissions, checking the output of ssh -v (or even -vvv) might help – Tobias Kienzler Oct 29 '13 at 13:42

Be careful with the permissions, if the file or the directory containing the ssh files has been chmoded to 777 then sshd will refuse to use that form of authentication for security reasons.

share|improve this answer

Check that the remote end's sshd_config has an AuthorizedKeysFile directive matching what you expect (or none; the default is .ssh/authorized_keys), that PubkeyAuthentication has not been disabled, and that either UsePAM is disabled or that the PAM service configuration for sshd does not force interactive password entry. Also check whether the remote has installed openssh-blacklist, and if so, check if your key is affected.

share|improve this answer

Check the permission on .ssh/authorized_keys file. Others must read permission to read the key.


share|improve this answer
No, ~/.ssh/authorized_keys doesn't need to be readable by anyyone but the user. It needs to be unwritable by everyone except the user, as do ~/.ssh and ~. – Gilles Dec 2 '10 at 19:58

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.