I´d like to enable the ssh root access on Ubuntu 14.04. Editing the /etc/ssh_config (PermitRootLogin yes) didn't affect anything.
- 145
- 1,459
5 Answers
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.
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
- 411
For me, none of these steps worked, I've even tried something I wouldn't ever try for something else then a toy vm: PermitRootLogin without-password
The only thing that worked for me was disabling the PAM module for this:
UsePAM no
This option is normally at the very end of the file. To be honest, I don't know the real drawbacks of this, but since you're not supposed to allow root login online, I guess it's okay for a private dev-vm.
Nevertheless, set a strong password, always. Nope this is not an exception. Not even only this time...
- 117