ssh – server refused our public key

Question:

I can login to ssh correctly if I use my password. However attempts to use my key result in:

server refused our public key

Answer:

Make sure you do not have group or other write permissions on your .ssh directory

If in question, issue the command:


chmod 700 ~/.ssh
chmod 600 .ssh/authorized_keys*

sshd is very strict on the permissions for your keys. It will not use them if it believes the permissions are unsafe.

Leave a Reply

Your email address will not be published. Required fields are marked *