How to Allow root to use SSH on Ubuntu 14.04

Share this Article :

Ubuntu is Debian-based distributions that don’t allow logins by the root user by default, either locally or remotely via SSH. Previous post, i have discussed how to enable root login on Ubuntu 14.04 by issue the following command :

sudo passwd root

Above command not allow the root user to remotely use SSH connection by default. There are a few more steps need to perform in order to allow root to use SSH on Ubuntu 14.04. Kindly follow below steps :

Also Read :   How to Install ClamAV on Ubuntu Server 14.04

1. Login using normal user and su to root. Edit /etc/ssh/sshd_config :

[email protected]:~$ su - root
[email protected]:~# vi /etc/ssh/sshd_config

2. Comment out #PermitRootLogin without-password, add PermitRootLogin yes into the line :

# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes

3. Restart ssh service to take affect the changes :

[email protected]:~# service sshd restart
ssh stop/waiting
ssh start/running, process 1499
[email protected]:~#

4. That’s all.


  1. GiGiRock
    • Dean
  2. God

Leave a Reply