DEV Community

Cover image for Set up a password-protected Linux Virtual Machine in Azure; Step-by-step guide.
Awoyemi Samuel Ola
Awoyemi Samuel Ola

Posted on

Set up a password-protected Linux Virtual Machine in Azure; Step-by-step guide.

"Hey there, tech enthusiasts! Get ready to dive into our super cool project where we're diving into the world of cloud magic.

We'll be spilling the beans on how we're using Azure to whip up virtual machines like it's nobody's business.

So, grab your virtual hard hats, and let's get this digital party started!"

So, today we want to consider how to spin up a supper cool Linux Virtual machine in minutes through the steps below:

  • Log in to Azure Portal

  • Sign in to your Azure account at "portal.azure.com."

Step 1: Click Create a Resource

Image description

Step 2: Click Create a Virtual Machine

Image description

Step 3: Create a Resource Group

Image description

Step 4: Name the Virtual machine and select "Ubuntu Server 20.04 LTS x64 Gen2" after selecting other parameters.

Image description

Step 5: Select the size, check the password box, and Create the Administrator's account.

Image description

Step 6: Configure the inbound ports rule

Image description

Step 7: Click next to configure the Virtual machine "Disks".

Leave everything in default in "disks" as seen in the screenshot.

Image description

Step 8: To configure the network interface, click on "basic" under the NIC network security group and "allow selected ports" under Public inbound ports.

Image description

Step 9: Click on Management and leave it as default.

To configure Monitoring, Click on "enable with managed storage account" in Boot Diagnostics.

Image description

Step 10: Click on "Tag" to create an identification for the Virtual Machine.

Image description

Step 11: After clicking on review and create, wait to see "Validation passed"

Image description

Step 12: Click "Create"

Image description

Step 13: Once deployment is complete, click on "Go to resource"

Image description

Step 14: Click on "Connect" to connect the Virtual machine

Image description

Step 15: Select Native SSH

Image description

Step 17: Copy the SSH command

Image description

Step 18: Connect the Virtual machine by writing the SSH command lines on Powershell

a. On the Windows search, search for Powershell
b. Open Powershell as an Administrator
c. Execute the az login command: az login

Image description

Step 19: Execute the "SSH Command line"

Image description

Step 20: Next up - type Yes and supply the administrator password. The password seems not to appear, no worries, it is for security purposes. Just press enter and the Virtual machine will be connected as seen in the screenshot.

Image description

As you wrap up this journey by deploying a Linux virtual machine, you've unlocked digital possibilities.

Armed with the step-by-step guide, you're now equipped to harness the power of cloud technology and create your own virtual environments.

Remember, every click, every command you've learned here paves the way for innovation, efficiency, and limitless exploration in the digital landscape.

So go forth, experiment, and let your virtual machine adventures inspire your tech-driven dreams!

*The Clouds is no longer cloudy, so anyone can run on the Cloud *

Top comments (0)