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: 2307 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: without restart the services disable SSH direct root login  no direct login root  unix "disable direct login" ssh  unix disable direct login  disable direct login + linux  stop direct root login using ssh  no direct login to root config  unix disabling direct login to root  direct root login disabled unix  ssh disable root login