linux poison RSS
linux poison Email

How to Disable Direct Root Login to SSH on Ubuntu

One security tweak you need to consider is with Open-SSH server. By default, direct log on for root is enabled, which means your just asking for trouble with hackers attempting to break into your Computer. Instead, you can easily disable root access from logging into your SSH server,

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 120
PermitRootLogin yes
StrictModes yes
Modify PermitRootLogin as shown below:
PermitRootLogin no
This 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 restart
After 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.


4 comments:

Post a Comment

Related Posts with Thumbnails