Disable Root Access
you'll need to edit the /etc/ssh/sshd_config file using your favorite editor
Once gedit or kate opens, scroll down until you see the following section…
LoginGraceTime 120Modify PermitRootLogin as shown below:
PermitRootLogin yes
StrictModes yes
PermitRootLogin noThis will disable root's access to logon via SSH. Save the file and exit.
Now you'll need to restart the sshd service from a Terminal window using the following command:
sudo /etc/init.d/sshd restartAfter restarting SSH, try to connect using the root account. Access should be disallowed and you should only be able to log on with your user account. Once you do login, you can access the root account by using the su command.
3 comments:
Instead of restarting it's better to reload; see this link
http://www.markus-gattol.name/ws/ssh.html#reload_vs_restart
Or try the slightly less restrictive alternative of ' PermitRootLogin without-password' to require key-based authentication.
Here is, SSH login without password >> http://linuxpoison.blogspot.com/2008/05/ssh-login-without-password.html
Post a Comment