Would you like to learn how to configure OpenSSH to allow SSH login using RSA keys? In this tutorial, we are going to show you all the steps required to configure the OpenSSH service ao allow SSH login using RSA keys on Ubuntu Linux.

• Ubuntu 18.04
• Ubuntu 19.10
• Ubuntu 20.04

Ubuntu Playlist:

On this page, we offer quick access to a list of videos related to Ubuntu Linux.

Don’t forget to subscribe to our youtube channel named FKIT.

Ubuntu Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Ubuntu linux.

Tutorial Ubuntu Client – SSH login using RSA key

• IP – 192.168.100.9
• Hostname – UBUNTUCLIENT

Install the required packages on the client computer.

Copy to Clipboard

Create a user account.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Login the system using the user account.

Copy to Clipboard

Create an RSA key.

Copy to Clipboard

Optionally, enter a password to protect the key.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Verify the content of the user’s hidden directory named SSH.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

The file named ID_RSA contains the user’s private key.

Copy to Clipboard

The other file contains the user’s public key.

Copy to Clipboard

You have finished the client-side required configuration.

Tutorial Ubuntu Server – SSH login using RSA key

• IP – 192.168.100.10
• Hostname – UBUNTUSERVER

Install the required packages on the server computer.

Copy to Clipboard

Create a user account.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Login the system using the user account.

Copy to Clipboard

Create a hidden directory named SSH inside the user HOME directory.

Copy to Clipboard

Access the SSH hidden directory and create a file named AUTHORIZED_KEYS.

Copy to Clipboard

Insert the content of the public key generated on the client computer into this file.

Copy to Clipboard

Here is the file content.

Copy to Clipboard

You have finished the server-side required configuration.

Testing the SSH login using RSA key

On the client computer, start an SSH connection to the remote server.

Copy to Clipboard

If required, enter the Key password.

Copy to Clipboard

After a successful login, the remote access will be authorized.

Copy to Clipboard

Congratulations! You did setup the SSH authentication using RSA keys.