Skip to main content

Ubuntu Server Root SSH Remote Access

Victoria Harbour, Hong Kong

Enabling root account for command line

sudo -i passwd root
Enter new UNIX password: [Set new password for root account]
Retype new UNIX password: [Confirm new password]

Disabling root account

sudo passwd -dl root

Enable root login over SSH

nano /etc/ssh/sshd_config

PermitRootLogin yes
systemctl restart sshd

or

service sshd restart