Getting Started with Azure Virtual Machines - Linux
A step-by-step beginner's guide for deploying an Ubuntu Linux Virtual Machine on Azure

I am a multifaceted skilled and results-driven IT professional with a background in Application Support, IT Service Management and Cloud/DevOps Engineering spanning over 4 years in the Fintech sector. I am skilled in utilising advanced tools to extract meaningful insights from intricate datasets and creating innovative solutions by building scalable, reliable, and efficient systems. I have a proven track record of leading impactful projects and my strengths in strategic analysis, attention to detail, persuasive and articulate communication, stakeholder management, and collaborative problem-solving, give me an edge to perform optimally in any environment.
Introduction
Hello there! In my previous article, I gave a concise background into what Virtual Machines are and went through the steps of deploying a Windows 11 virtual machine on Azure from the portal. I also explained some of the important terms and requirements in creating resources generally on Azure. If you missed it, you can check it out below as we'll dive right into today's subject, skipping the preliminaries and extras.
In today's article, we will simply deploy an Ubuntu Linux Virtual Machine and connect to it using Native SSH. Shall we?
Deploying the Linux (ubuntu 20.04) VM
On the homepage of the Azure portal, create the VM by following any of the below steps:
Click on "Create a resource" and then Virtual Machine or by clicking "Virtual machines"
In the search bar, start typing "Virtual Machines" and select it from the search suggestions
Click on the menu button, select "Create a resource" and search for "Virtual Machines"

Basics
a) Once the Basics page of the virtual machine creation page comes up, fill in the required parameters for the project details like subscription and resource group.
b) In the Instance details fill in the VM name, the best Region, and other parameters. In the image dropdown, make sure to select "Ubuntu Server" as shown below as well as the required size for your VM.

c) Set up the Administrator account credentials. In this case, we will be using an SSH public key.
i) Select a username. We will proceed with the default username "azureuser".
ii) For the SSH public key source, select the option to Generate a new key pair and give it your preferred name.
d) Also, select SSH as one of your required inbound port rules.
Click on "Next: Disks >" to move to the next section

Disks
In this section, select your preferred OS disk size and type as shown below.
For "Key management", we maintain the default as "Platform managed key". You can choose to modify other options or maintain the defaults.

Move to the next section and configure the other tabs as required then click on "Review + Create"
Download Private Key and Create Resource
a) After reviewing and ensuring that all the necessary basic conditions and parameters required for the VM creation are supplied click "Create" and then "Download private key and create resource" in the dialogue box that comes up.

b) Download and save the private key in a preferred location on your local machine.

c) The deployment should begin at this point. Give it a few minutes to progress and you will be notified when it's done. Once the deployment is marked complete your VM is ready and you can click "Go to resource" to check it out and view its properties.

Connecting to your VM using Native SSH
a) On your new Ubuntu Linux VM's overview page, click "connect" and select the Native SSH option on the next page.


There are other options to connect and you can view them by expanding the "More ways to connect(3)" dropdown
b) The Native SSH pane appears which gives you the steps to connect from your Windows local machine. (If you're not using Windows, click on "Switch local machine OS" to select your OS)

i) Configure prerequisites for Native SSH: Allow Azure to configure some prerequisite features to connect to the VM (Port 22 Access and a Public IP Address). Once this is done you will see a green tick beside all 2 prerequisites.
ii) Open a local shell as an administrator in this case we will use Windows PowerShell.
iii) Copy and execute the SSH Command as shown below taking note of your unique Private Key Path, username and VM Public IP address .

Welcome! You are now connected to your Ubuntu Linux Azure Virtual Machine!

When you are done administering your VM and it is no longer in use, don't forget to clean up by deleting the VM and the associated resources.
Conclusion
Thank you for making it to the end of this guide. I hope you were able to follow it and connect successfully to your Linux VM. Let me know what you think about it and if you have any questions, feel free to reach out!

