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
PermitRootLogin
and remove the comment#
. -
By default, the value of
PermitRootLogin
is often set toprohibit-password
orno
. Change it toyes
if you want to allow root login:sshd_configPermitRootLogin yes
-
Restart the SSH Service to apply the changes:
sudo systemctl restart sshd