For security reasons, it is best to disable remote root logins to a server. This can be done by the following steps.
- SSH into server and login as root.
- navigate to the directory /etc/ssh/sshd_config and open the file sshd_config for editing
- Scroll down the SSH server configuration file and locate the line below:
#PermitRootLogin yes
- Uncomment the line by removing the hash symbol (#), and then change the “yes” to “no”.
PermitRootLogin no
- Save and quit the config file.
- Restart SSH server using the following command at the prompt
/etc/rc.d/init.d/sshd restart
- remote root logins have now been disabled.
Showing posts with label root. Show all posts
Showing posts with label root. Show all posts
Thursday, February 5, 2009
Subscribe to:
Posts (Atom)