Like several previous release, Ubuntu Server 20.04 LTS doesn't give a password to root. This behavior from Ubuntu claimed to be more secure than have a password for root. But you can still doing ssh remote directly to your root Ubuntu Server even without a password by using RSA key pair without making change to this secure behavior.
Posted on April 2, 2020 in Ubuntu Server 20.04 SSH, also known as Secure Socket Shell or Secure Shell, is a cryptographic protocol that helps to encrypt communication in unsecured networks where an SSHD is the daemon program for SSH. Together they provide secure communication between two untrusted hosts over an insecure network. A) You need to have a running Ubuntu 20.04 Server. By default, the ssh server is not installed on ubuntu 20.04. If you want to make your machine ssh server machine then you will have to install first on you Ubuntu. As you know installing any package is very easy, Similar you can install ssh-server from ubunut’s repository by running following command. These steps showing you how to enable SSH should work for almost every version of Ubuntu (Including 18.04 and 20.04). OpenSSH has been the standard for providing SSH since 1999. Enabling SSH on Ubuntu. In this section, we will show you the straightforward steps to enable SSH on your Ubuntu device.
In this post, I am using a newly installed Ubuntu Server 20.04 with OpenSSH server installed and without changing anything in
sshd_config
file. Some people will just gives a password to root and making a change in /etc/ssh/sshd_config to permit root login, etc.Also we are not gonna using
PuTTY
, but native Windows 10 Command Prompt with OpenSSH client enabled. For you who didn't no about OpenSSH client in Command prompt yet, please read this previous post: Enable OpenSSH Client on Windows 10, PuTTY on Command Prompt.How to remote SSH to Ubuntu Server 20.04 root Without Password Using Windows Command Prompt
- Open Windows Command Prompt
- Go to your user folder
- Go to .ssh folder
- Create RSA key pair using Command Prompt
Create RSA key pair using Command Prompt |
ssh-keygen
will create 2 new files, usedir
command to list files in the .ssh directory
id_rsa
is your private key andid_rsa.pub
is your public key.- Open id_rsa.pub with notepad, this command will do it
Open id_rsa.pub with notepad |
- Copy all the content, and we will paste it later to Ubuntu Server
- Now, remote ssh to your Ubuntu Server using normal sudoers user and password
- Edit or create authorized_keys file in root .ssh folder
- Copy the content of id_rsa.pub from notepad and paste it to ssh Command Prompt by right click on the terminal
Ubuntu 20.04 Sshd
- Open a new Command Prompt Window and remote ssh to the server root
Install Openssh Ubuntu 20
- If anything goes right, you'll log in to your Ubuntu Server 20.04 root without password
Ubuntu 20 Enable Ssh Servers
I am working on the video on How to remote SSH to Ubuntu Server 20.04 root Without Password Using Windows Command Prompt, it will be a short video. Keep alert by subscribing to my youtube channel https://www.youtube.com/channel/UC4SMlEsxgVhLs7BeKwjyq7g/