Thursday, 17 January 2019 .::. Your IP: 54.205.211.87 
Home Security Disable the root login for SSH

Disable the root login for SSH


To stop the direct root access you have to edit the SSH configuration file located at "/etc/ssh/sshd_config"

Open the file with your favorite editor and locate the 'Authentication' section. There set PermitRootLogin to be "no" as in the example bellow.
##################
# Authentication:
#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
##################

Once you are ready save the file and restart the ssh service.

Note: You MUST have a different user on the system that you can use to login over SSH otherwise you won't be able to access the machine over SSH anymore.

You can use the following commands to add a new user:

useradd: creates the user
passwd: set the password for the new user
Note: These commands works on Linux. You should check the equivalents for your OS if it's different.


Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Facebook! Slashdot! StumbleUpon! TwitThis Joomla Free PHP