Change root password
sudo passwd root
2. Log in with another account and modify /etc/ssh/sshd_config via sudo nano:
xxx@ubuntu14:~$ su - root Password: root@ubuntu14:~# vi /etc/ssh/sshd_config
3. Comment out #PermitRootLogin without-password and add PermitRootLogin ye
# Authentication: LoginGraceTime 120 #PermitRootLogin without-password PermitRootLogin yes StrictModes yes
4. Restart the ssh service
root@ubuntu14:~# sudo service ssh restart ssh stop/waiting ssh start/running, process 1499 root@ubuntu14:~#