turn off ssh access code example
Example 1: 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
Example 2: bitnami wordpress enable ssh
# debian
sudo rm -f /etc/ssh/sshd_not_to_be_run
sudo systemctl enable ssh
sudo systemctl start ssh