A journal for curious minds & hands-on builders.

Follow Marxtudor

How to disable root login on CentOs VPS

Root login should ideally be disabled due to security reasons.

To disable root login edit the sshd_config file using vi or any other editor

 sudo vi /etc/ssh/sshd_config

The above command would open up the sshd_config file

disable root login in centos
Change the line
#PermitRootLogin yes to PermitRootLogin no

After making the change restart sshd

sudo systemctl restart sshd
Previous story
Next story

Join the conversation.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.