Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by www.cyberciti.biz #
 
PREVIOUS NEXT
Tagged: #disable #password #ssh #login
ADD COMMENT
Topic
Name
2+8 =