e Learning

How to Enable Root SSH Login In Ubuntu 14.04

By Default ssh root login disabled in Ubuntu 14.04. This wasn’t a case in Ubuntu 12 which had root SSH Login enabled out of the box. First time I Installed Ubuntu 14.04  and when ssh to my new server with the root user, I got the error messages Access denied.

First my thought was that I am entering the Password incorrectly and I even reset the root password. But Only after looking at the sshd_conf file, I realize that This is Because the root login has been disabled by default in Ubuntu 14. And, I did the following steps to enable Ubuntu root ssh login.

Step One

Open Ubuntu SSH Configuration File

To enable root ssh login we need to edit ssh main configuration file. Open the main ssh config file using a text editor. I always use command line text editor vim

sudo vim /etc/ssh/sshd_config

Step Two

Set PermitRootLogin to be yes

And then find the Parameter PermitRootLogin. by default its value is without-password. Change value to yes, as bellow.

PermitRootLogin yes

Now Save The Changes and restart the ssh services

Ubuntu Enable Root SSH Login
Step Three

Restart the ssh service

sudo service ssh restart

That would be all you need to do and You should now be able to Connect to Your Ubuntu Server Remotely using the root user login.