So the last time I tried to set up SSH keys I followed the tutorial here: https://help.ubuntu.com/community/SSH/OpenSSH/Keys and had it working within minutes. My client computer is on ubuntu and the host is centos 6. It's been about a year since and now I have to do it again and I'm having an issue.
After restarting ssh and trying to login it still requests me for a password, so I turned PasswordAuthentication to no, but then I get a permission denied error for the public key. I've googled this and almost all sources state the issue is that the permissions are not set correctly on your .ssh folder and authorized_keys file. On the server my .ssh folder is 700 and the authorized_keys file is 600, but I'm still receiving this error. In my sshd_config file I have PubkeyAuthentication yes and RSAAuthentication yes. The signature in my authorized_keys matches my id_rsa.pub file. When I look in /var/log/secure it just says the connection was closed by my IP.
The only thing difference from setting up since last time is that the user I'm trying to login as with the SSH key is root. Even though that probably may be frowned upon, it should still work shouldn't it?
I've also tried deleting my entire ssh folder and starting again, but no luck. Anyone know what else I can try? Thanks.