Answers for "disable ssh password login"


disable ssh login for user

# To deny SSH access to specific user called “sk”, edit sshd_config file:
$ sudo vi /etc/ssh/sshd_config

# Add/edit the following line in sshd_config file.
DenyUsers sk

# Deny SSH access to multiple users, specify the usernames with space separated as shown below.
DenyUsers sk ostechnix

# Deny SSH access to an entire group, for example root, add:
DenyGroups root

# Save and quit the ssh config file. Restart ssh service to take effect the changes.
$ sudo systemctl restart sshd
Posted by: Guest on March-28-2020

disable ssh password login

$ sudo vi /etc/ssh/sshd_config

ChallengeResponseAuthentication no
PasswordAuthentication no
Posted by: Guest on May-11-2021

Code answers related to "disable ssh password login"

Browse Popular Code Answers by Language