permission denied on authorized_key file
It might be SE Linux. If the context of the file isn't correct, running this as root
should fix.
restorecon -Rv /home/user/.ssh
Also check the permissions on /home/user/.ssh
aren't wide open. SSHD is quite particular about this.
chmod 0700 /home/user/.ssh
I had a similar issue, and in my case the cause was wrong ownership of both the .ssh directory and .ssh/authorized_keys file. To fix that, in /home/user as root:
chown user:user .ssh
chown user:user .ssh/authorized_keys
Your authorized_keys
file should have permissions rw-------
. Run:
chmod 600 ~/.ssh/authorized_keys
And just as a note your private key (typically id_rsa
) on the client should have the same permissions.