How to deny/block root login in SSH

To block/deny root login in ssh, do the following (under FC4/5)

1.>vi /etc/ssh/sshd_config
2.Find the line:

#PermitRootLogin yes

Uncomment this line and change the word 'yes' to 'no' as follow:

PermitRootLogin no

3.Restart SSH: /etc/init.d/ssh restart

Finished!

Although user cannot login as root directly through SSH, they can login as normal user and 'sudo su -' to login as root. Please be careful.

Comments

Popular posts from this blog

TCPDF How to show/display Chinese Character?

How to fix fancy box/Easy Fancybox scroll not work in mobile

Wordpress Load balancing: 2 web servers 1 MySQL without any Cloud services