How to enable ssh for root on Ubuntu 14.04

Setting a root password is not enough for Ubuntu 14.04 Server

Edit /etc/ssh/sshd_config,

sudo nano /etc/ssh/sshd_config

Commend out PermitRootLogin without-password

#PermitRootLogin without-password

Add the following line

PermitRootLogin yes

Set root password and restart SSH service

sudo passwd root
sudo systemctl restart sshd

For 18.04 server

$ sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config

Leave a Comment

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