A Beginner’s Guide to Deploying a Linux Virtual Machine with ssh public key on Microsoft Azure


NAVIGATING A LINUX VIRTUAL MACHINE ON AZURE, and connecting using (Native SSH)
In today’s cloud-driven world, Linux virtual machines (VMs) have become the backbone of many enterprise and developer environments. Microsoft Azure makes it possible to deploy, configure, and manage Linux VMs quickly, without the complexity of physical hardware. Whether you’re hosting applications, running development workloads, or experimenting with open-source tools, knowing how to navigate a Linux VM in Azure is a valuable skill.
In this guide, we’ll walk through the essentials—from connecting to your Linux VM using SSH, to exploring common commands and best practices for managing your environment. By the end, you’ll have the confidence to interact with your Linux VM on Azure like a pro.
Navigate to portal.azure.com.
Click create and select virtual machine.
Give your virtual machine a name
Availability options: select a preferred Available zone
Image: select any of the Ubuntu image
Administrator account: select SSH public key
Username: enter your username
SSH Key Type: select RSA SSH Format
Select inbound ports: Select HTTPS(443) & SSH(22).
Click review and create.
Once your validation passes, a pop-up will appear to download your private key…Download it to your local host drive.
After successfully deploying, click on Go to the resource group
Navigate back to your local host drive, locate and open the downloaded private key pair using chrome, and copy the key path at the top from C: to the end, OR navigate to file explorer, right click at the keypair file, and select copy as path.
Navigate back to your azure portal
j) We can see that our virtual machine and all other dependants like its disk, network and security group are located in the resource group
k) Click on your LinuxVM created which is named "simpleLinuxVM"
To connect to your virtual machine, click on "Connect" on the upper-left side of your virtual machine.
To quickly connect to your virtual machine, input the following command in your Linux or PowerShell terminal on your desktop
ssh <your username@IPaddress> and click enter.
To copy your IP address, go to the overview. You will see your Public IP address toward the right highlighted below.
Go to your Terminal and input the command:
ssh -i <your private key path> OR ssh <your username@IPaddress> as shown below. Click enter.
Input your password and press Enter.
You are now connected to your Linux Virtual Machine.
SUCCESS……
I hope you find my post helpful, and it can guide you through the process with no difficulties.
Join me on this cloud adventure and elevate your tech skills! Sign in to the Azure portal, follow my easy instructions, and unleash the power of being in the cloud.
Subscribe to my blog for more tech tips and tricks that will keep you ahead in the digital game. Your journey to mastering Cloud computing starts here!
🌟 Thank you for being a part of this incredible journey! Together, let's unlock new opportunities and make the most out of our digital experiences. Happy computing! 🌟
Subscribe to my newsletter
Read articles from shafiu usman directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
