Allow Root Login Over SSH Ubuntu 16.04 LTS

This article is follow up of Enable root login on Ubuntu 16.04 LTS. Assume that you have already set the password for your root account. It will help you allow to login as root over SSH. SSH stands for Secure Shell that is a cryptographic network protocol for operating network services securely over an unsecured network. For example, remote login to computer systems by users. SSH works over port 22. As usual, for better security root ssh access is set as by default “Prohibit-password",That means to you is that, if you are trying to ssh to your server with your root account and password, you will receive an access denied error.

SSH Root

In order to overcome this limitation, you will need to edit the file /etc/ssh/sshd_config to allow root password logins through SSH. As shown below, go to Authentication Section and comment out #PermitRootLogin Prohibit-password and add PermitRootLogin yes.

Prerequisite: 

Make sure you have installed OpenSSH-Server. If you do not have then install it.

$ sudo apt-get install openssh-server

Authentication Configuration  of sshd_config:

Open /etc/ssh/sshd_config using editor

# Authentication:
LoginGraceTime 30
#PermitRootLogin Prohinit-password
PermitRootLogin yes
StrictModes yes
FROM:
PermitRootLogin prohibit-password
TO:
PermitRootLogin yes

Once you have made the above configuration then save the file, And finally, you will need to restart the ssh daemon in order for the changes to take effect using the command below.

 $ service ssh restart

After the ssh service is restarted, you should now be able to login through SSH using your root account and password.

ssh after config

Watch On Youtube:

Hope this article helpful for you. If you have and query please leave a reply below we will try to solve your problem.

The following two tabs change content below.

Subroto Mondal

Chief Coordinator HR&CR
I like Programming and New Technologies. And work with Linux.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.