Answers for "linux remove root user password for ssh"

1

how to disable password for ssh sudo users only

$ 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
0

linux delete user password

# sudo -i without password
sudo visudo
<username> ALL=(ALL) NOPASSWD:ALL

# Delete the password for your user by running this command:
sudo passwd -d `whoami`
Posted by: Guest on August-07-2021

Code answers related to "linux remove root user password for ssh"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language