Hello.
Im trying to add a new computer a ssh key-based authentication to my centos 7 server.
Im using this article as a guide.
https://www.digitalocean.com/community/ ... nux-server
I have generated the key pair. The private and public keys.
I uploaded the public key to the authorized_keys file in the server of the /root/.ssh
I checked if have that line in the /etc/ssh/sshd_config
PubkeyAuthentication yes
I have restarted the sshd service
But I'm still prompted for password when log in to the ssh server
I think im not missing anything.
Whats goign on?
-rw------- 1 root root 405 Aug 2 17:41 authorized_keys
-rw------- 1 root root 0 Aug 2 17:39 known_hosts
I guess the permissions of these server files are correct.
Thank you
Regards.
Configure ssh key-based Authentication
Re: Configure ssh key-based Authentication
You're logging in as root? Bad - slap yourself. Also there's a PermitRoot (or something like that) in sshd_config.
Did you run a restorecon -R on ~/.ssh before attempting the connection?
Also you can use ssh -vvv to output verbose things about what's going on when connecting.
And you can look in the system logs (journalctl) for more clues.
Did you run a restorecon -R on ~/.ssh before attempting the connection?
Also you can use ssh -vvv to output verbose things about what's going on when connecting.
And you can look in the system logs (journalctl) for more clues.