SSH consists of two keys, private and public key. The public key is placed on the Linux VM and the private key is what we present to verify our identity. In the first step, we will create an SSH key, and then, in the second step, we will create an Ubuntu Server and add an SSH key to it.

Step 1: Create an SSH key

Step 2: Assign it to the Ubuntu Server

Once we created the SSH key in the previous step, the next step would be to add it to your Ubuntu Server hosted on Azure. This can be done in two scenarios, for the existing Ubuntu Server or a new one your create. I´ll walk you through the procedure for both scenarios. Let´s start with the new virtual machine.

Create SSH key pair in Microsoft Azure and add it to Ubuntu Server - 91Create SSH key pair in Microsoft Azure and add it to Ubuntu Server - 21Create SSH key pair in Microsoft Azure and add it to Ubuntu Server - 33Create SSH key pair in Microsoft Azure and add it to Ubuntu Server - 37Create SSH key pair in Microsoft Azure and add it to Ubuntu Server - 86Create SSH key pair in Microsoft Azure and add it to Ubuntu Server - 25Create SSH key pair in Microsoft Azure and add it to Ubuntu Server - 87Create SSH key pair in Microsoft Azure and add it to Ubuntu Server - 60Create SSH key pair in Microsoft Azure and add it to Ubuntu Server - 40