Allow SSH Login as Root User
This page will explain how to allow the root user to login via SSH.
Warning
This feature is disabled by default for security reasons.
-
Open the SSH configuration file on your server:
sudo nano /etc/ssh/sshd_config -
Look for the line that says
PermitRootLoginand remove the comment#. -
By default, the value of
PermitRootLoginis often set toprohibit-passwordorno. Change it toyesif you want to allow root login:sshd_configPermitRootLogin yes -
Restart the SSH Service to apply the changes:
sudo systemctl restart sshd