Ubuntu Tutorials

How To Enable Root Login And SSH For Ubuntu 20.04

In this tutorial you will be shown how to enable Root login and SSH for Ubuntu 20.04. Root access is the administrative user that you can use to access and edit all of the files on your server (this includes system-critical files). In some situations, for proper installation of software on Ubuntu 20.04 using root access will make things easier.

Let’s get started 

  1. Log into your Ubuntu 20.04 server and run the following command to apply a password to the root user.
sudo passwd root

2. Now, let’s edit your SSH config to allow root to be able to SSH into your Ubuntu 20.04 server. 

sudo nano /etc/ssh/sshd_config

3. Move down towards the end of the config file and type in the following.

PermitRootLogin Yes

4. Use CTRL+X and you will be prompted to save the config.

5. You should be prompted with the question to Save Modified Buffer? Type in the letter: y

6. Now you should be prompted with File Name to write: /etc/ssh/sshd_config. Press Enter 

7. Reboot your Ubuntu 20.04 server. You should now have the ability to SSH into server as root.

I hope this article was helpful, if you have any questions, please feel free to contact me. If you would like to be notified of when I create a new post, you can subscribe to my blog alert.

Discover more from Patrick Domingues

Subscribe to get the latest posts to your email.

author avatar
Patrick Domingues

Leave a Comment

Stay Informed

Receive instant notifications when new content is released.