To disable the root login [CentOs]:
sudo passwd root [to change the password for root user if needed].
sudo vi /etc/ssh/sshd_config
PermitRootLogin no
sudo systemctl restart sshd
ssh root@ip;
You should not be allowed to login [Permission denied, error]
Reference URL: https://www.tecmint.com/disable-ssh-root-login-in-linux/
Top comments (0)