SSH Server refused our key

I got the following error when logging in to a server using SSH key authentication.

Server refused our key

I checked the log file

tail /var/log/secure

found following error

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.

chmod 600 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

See SSH

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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