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


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.


Popular posts from this blog

TCPDF How to show/display Chinese Character?

Using wget bypass htaccess username password 401 authorization

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