Enable SSH root login on Ubuntu/CentOS

By default the root’s ssh remote shell access is denied by default.

Any attempt to remote login as root will result inĀ Permission denied message:

root@10.0.0.55's password: 
Permission denied, please try again.

The following config will guide you through the process of enabling SSH root login on Ubuntu/CentOS

Step 1: Open config file

vi /etc/ssh/sshd_config

Step 2: Change line:

FROM:
PermitRootLogin prohibit-password
TO:
PermitRootLogin yes

Step 3: Restart service

systemctl restart sshd

After you restart sshd daemon you will be able to remotely login as a root user

Leave a Reply

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