The following config will guide you through the process of enabling SSH root login on Ubuntu 16.04 Xenial Xerus Linux Server or Desktop. This guide assumes that you are in possession of root password and are able to login directly on your system as root user. Use the following guide, if you do not have a root's user password.

By default the root's ssh remote shell access is denied by default. Any attempt to remote login as root will result in Permission denied message:
$ ssh This email address is being protected from spambots. You need JavaScript enabled to view it.
	
This email address is being protected from spambots. You need JavaScript enabled to view it.'s password: 
Permission denied, please try again.
This email address is being protected from spambots. You need JavaScript enabled to view it.'s password:
In order to enable root ssh login on Ubuntu 16.04 Xenial Xerus Linux run the following linux command:
$ sudo sed -i 's/prohibit-password/yes/' /etc/ssh/sshd_config
or manually open sshd configuration file /etc/ssh/sshd_config and change line:
FROM:
PermitRootLogin prohibit-password
TO:
PermitRootLogin yes
Once you have made the above configuration change restart ssh daemon:


$ sudo systemctl restart sshd
After you restart sshd daemon you will be able to remotely login as a root user:
$ ssh This email address is being protected from spambots. You need JavaScript enabled to view it.
	
This email address is being protected from spambots. You need JavaScript enabled to view it.'s password: 
Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.0-22-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

22 packages can be updated.
20 updates are security updates.


The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME or create a JOB ALERT on LinuxCareers.com job portal.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions