configure the sshd server to disable password login and enable keys.
First - We need to generate a pair of keys.
and then
Editing the config file /etc/ssh/sshd_config
login to remote server using the password to configure the sshd server to disable password login and enable keys.
And then edit…
#Disable Login password
#PasswordAuthentication no
ChallengeResponseAuthentication no
#Allow forwarding yes
AllowTcpForwarding no
# Uncomment ‘PasswordAuthentication no’ line only after making sure that the key authentication is working properly.
# Disabling root login is recommended anyway, though not useful after disabling login password.
# Allow forwarding is not recommended for multi user hosting envirnoment where keys could be exposed. Anyway, we should only allow it if we intend to forward keys from server to server but keep all our keys on the local machine.
Leave a Reply
You must be logged in to post a comment.