I don’t think this is first time when I digged Google for that problem.
I set up a new machine, I want to be able use passwordless way (RSA key) to log into it (as root). I change /etc/ssh/sshd_config to have:
I copy the id_rsa.pub key to root’s .ssh/authorized_keys
Everything seems right, but… it is not working!
The connecting machine offers the key, but server does not take it.
And [again] – it turns out to be a problem with SELinux that does not allow sshd to read the user’s authorized_keys.
Solution is to set the right SELinux context for the file:
chcon -t ssh_home_t ~/.ssh/authorized_keys