DEV Community

Jeg
Jeg

Posted on

Disabling root login [CentOs]

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)

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay