SSH Server refused our key
I got the following error when logging in to a server using SSH key authentication.
1 |
Server refused our key |
I checked the log file
1 |
tail /var/log/secure |
found following error
1 |
May 11 17:45:31 server58 sshd[18483]: Authentication refused: bad ownership or modes for file /home/video/.ssh/authorized_keys |
The problem is fixed by setting proper permission for the .ssh folder and key file.
1 2 |
chmod 600 ~/.ssh chmod 600 ~/.ssh/authorized_keys |
See SSH