How to enable ssh root access on Ubuntu 14.04
Solution 1:
Simply adding a password for root is not enough for Ubuntu 14.04 Server.
You also need to edit /etc/ssh/sshd_config
, and comment out the following line:
PermitRootLogin without-password
Just below it, add the following line:
PermitRootLogin yes
Then restart SSH:
service ssh reload
For Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-59-generic x86_64) PermitRootLogin without-password
has been replaced by PermitRootLogin prohibit-password
.
Solution 2:
You need to setup a password for the root account and then it will work.
sudo passwd
Enter same password twice.
P.S. After modifying /etc/ssh/sshd_config don't forget to reload the openssh server.
sudo service ssh reload
Solution 3:
With Ubuntu 14.04 Server.
Set the password
sudo passwd
Changes in /etc/ssh/sshd_config
Change PermitRootLogin
PermitRootLogin yes
You may also have to check value of PasswordAuthentication. If it is set to no then set to yes
PasswordAuthentication yes
Then restart SSH:
service ssh restart
Solution 4:
For 14.04 you would have to comment below line in /etc/ssh/sshd_config
#StrictModes yes