Allow SSH root login on Ubuntu 20.04

Allow SSH root login on Ubuntu
The best way Allow SSH root login on Ubuntu is by using SSH (Secure Shell) that is used to handle network services securely over an unsecured network. Some examples include: remote command-line, login, and remote command execution. In this article you will learn how to enable SSH access for a root user on the Ubuntu 20.04 Server/Desktop.
- How to enable root access to SSH
- How to restart SSH service
Requirements for SSH
- Installed working version of Ubuntu 20,04
- SSH
- SSH Client
- Privileged Linux root system user via sudo command
Allowing SSH root login on Ubuntu 20.04
Step 1: Open /etc/ssh/sshd_config
with your favorite editor, I like to use vim
root@vps:~# vim /etc/ssh/sshd_config
Step 2: Change the line #PermitRootLogin prohibit-password
FROM: #PermitRootLogin prohibit-password
TO: PermitRootLogin yes
Step 3: Restart SSH
root@vps:~# service sshd restart
Voila you are done..You can now access SSH via root
NOTE: The quickest way to do this job could be just to simply use the sed
command as shown below:
$ sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config