Shell/Bash: disable ssh login for user Example
Shell/Bash Example: This is the "disable ssh login for user" Example. compiled from many sources on the internet by SimpleTutorials.org
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
* Summary: This "disable ssh login for user" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!