Configuring SSHD to disallow root login

Fedora 13 –

Configuring SSHD to disallow root login

Being able to SSH in as root is a security hole that one just shouldn’t risk, however when you first setup a box, it’s an option that’s enabled by default. To disable it, do the following.

first we’ll need to add a new user

adduser ppillera

then we’ll need to set the password for that user

passwd ppillera
Changing password for user ppillera.
New password: blah1234
Retype new password: blah1234
passwd: all authentication tokens updated successfully.

now that we’ve got a new user to SSH in as, we can disable root ssh.

vi /etc/ssh/sshd_config

change the following to read as follows

PermitRootLogin no

you’ll notice that you have to delete the “#” at the begening, and change the “yes” to “no”.

then all you have to do is restart the sshd service and you’re good to go

service sshd restart

Phil Pillera <ppillera [ a t ] gmail [ d o t ] com>