Networking, Programming and Graphics Tutorials
Home >> OS >> Linux >> SSH >>

How to disable the direct root login via SSH [1/1]

Type: Code Networking, Programming and Graphics Tutorials
How to disable the direct root login via SSH
Level: Intermediate Networking, Programming and Graphics Tutorials Networking, Programming and Graphics Tutorials 
How to disable the direct root login via SSH
Date: 2007-Jun-11
How to disable the direct root login via SSH
Visited: 2114 times
How to disable the direct root login via SSH
Rating: How to disable the direct root login via SSH
How to disable the direct root login via SSH
Author: Tony Potter

This tutorial will show you how to disable the direct root login on a computer with Unix/Linux operating system.

To stop the direct root access you must edit the SSH configuration file located at '/etc/ssh/sshd_config'

Open the file with your favorite editor, for example VIM, 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.

WARNING: DO NOT FORGET TO ALLOW DIFFERENT USER ACCESS BEFORE DENYING THE ROOT ONE!

This can easily done with this commands:

useradd newuser #creates the user
passwd newuser #set the password for the 'newuser'

If you have further questions you may ask them in our forum.



Rate this tutorial:                    
Networking, Programming and Graphics Tutorials - How to disable the direct root login via SSH [1/1] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: ssh direct root disable  unix disable direct login  unix "direct root login"  stop direct root login using ssh  direct root login disabled unix  how to disable root login on linux  Disable Root Login Warning  how to disable ssh root login in unix  plesk root ssh login disable  stop direct ssh for root  stop direct login ssh  plesk disable root ssh  mysql disable ssh login  plesk ip address login disable  windows xp disable guest login  mysql allow root login  allow root login mysql  how to allow root mysql login  stop root login  mysql allow root login