Disable ssh root login

There is a potential Crackers can get in to your server via ssh by figuring out the password of the root using brute force attack. So that it is better to control root access of the server via ssh.

For that use different user to log into the server and use sudo after logged in.

follow the steps to deny root access via ssh :

Create user with preferable username
#useradd chamara

give a strong password for the user
#passwd chamara

edit the following file with your favourite editor (vi is my favourite ;) )

#vim /etc/ssh/sshd_config

find the #PermitRootLogin yes and uncomment it and do "yes" to "no" like as below

PermitRootLogin no

save it and close the file

After that restart the sshd

#/etc/init.d/sshd restart

Thats all, have fun

Comments

Popular posts from this blog

MRTG configurations

ADSL configuration on Cisco router