Enable root login on SSH

Jan 14, 2024 min read

Follow the below instructions to enable ssh root login.

Become root

sudo su

Command to add lines in /etc/ssh/sshd_config

echo -e "PermitRootLogin yes\nPasswordAuthentication yes" | tee -a /etc/ssh/sshd_config

Restart ssh daemon

systemctl restart sshd