June 20, 2014
SSH authorized keys – Permission denied
I was trying to setup SSH login using public/private keys for the user root on a CentOS 6.4. But all I was getting was:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
The typical changes were made, such as:
PubkeyAuthentication yes
AuthorizedKeysFile ~/.ssh/authorized_keys
So it I ran the command the FireDaemon suggested, not knowing what it did:
restorecon -r -v -F /root/.ssh/authorized_keys
Lo and behold, now I can connect without passwords.
References: