Answers for "disable password ssh login"

1

disable password ssh login

$ sudo vi /etc/ssh/sshd_config

#Disable password for users so they can only connect with keys
# At the end of the file
ChallengeResponseAuthentication no

Match User user1,user2,root
    PasswordAuthentication no

Match Group data_user
	PasswordAuthentication no

# To check syntax error in the file
$ sshd -t 
# Restart the server
$ sudo systemctl restart ssh
Posted by: Guest on May-03-2022

Code answers related to "disable password ssh login"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language