Disable Root Login

More Secure

If you wanted to break into a system, one of the first ways to try is to find an account on the system. You could spend time guessing at users on the system or go for the one user on every Linux/Unix system. Root.

You know root exists on every system. It has to. All you need now is the password and your in. You're half way there.

To increase security, its best to disable root log in. Here's how.

As root open /etc/ssh/sshd_config and find the line PermitRootLogin.

emacs /etc/ssh/sshd_config
PermitRootLogin yes

Change 'yes' at the end of line to 'no', so it looks like this:

PermitRootLogin no

If the line has a hash mark '#' at start of line. Delete the '#' hash mark.

Save the file. Exit and restart sshd daemon.

/etc/init.d/ssh restart

Test it by trying to log in as root user. Log in should fail.

Done!