In order to disable root access to SSH you’ll need to edit the sshd_config file. So open it up with your favorite text editor..
The line we are looking for is:
You can uncomment this line, then change the yes to no to disable root login.
After you do this and save it (Ctrl+O then enter for nano) you’ll need to restart the sshd process with ‘/etc/init.d/sshd restart’. Now when you first login to SSH you’ll need to use a different username, then you can type in ‘su -‘, hit enter then type in your root password to switch to the root username if needed!
Mitch January 14th, 2011
Posted In: How To