Disabling SSH Login for the Root User

Login to your server as a user with sudo capabilities.

Once logged it, you will want to edit the /etc/ssh/sshd_config file with your favorite editor to prevent root access (I chose nano):

sudo nano /etc/ssh/sshd_config

Look for the line that contains PermitRootLogin yes and change it to the following:

PermitRootLogin no

Save your changes and then restart SSH:

/etc/init.d/ssh restart

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: