allow some user login via ssh and disable the other

# vi /etc/ssh/sshd_config

Add an AllowUsers line at the bottom of the file with a space separated by list of usernames. For example, user user1 and user2 both have access to remote ssh.

AllowUsers user1 user2
/etc/init.d/sshd restart

Leave a Reply

© 2019 IT & Photography blog | ScrollMe by AccessPress Themes