How to Enable SSH root login on Ubuntu Server

  • Change your root user password :-

        ==> sudo passwd root

  • Open the sshd_config file :-

        ==> sudo nano /etc/ssh/sshd_config

  • Find the following line in sshd_config :-

        ==> PermitRootLogin prohibit-password

  • Change the following line :-

        ==> PermitRootLogin yes

  • Then restart the ssh service :-

        ==> sudo /etc/init.d/ssh restart

Leave a Comment

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

Scroll to Top