Set up a password-protected Linux Virtual Machine in Azure; Step-by-step guide.
Published: 2023-08-19 06:40:26

_"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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o9e03yh9ndwvebv9jser.png)



**Step 2: Click Create a Virtual Machine**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i4br8koozgwzpdndheb8.png)

**Step 3: Create a Resource Group** 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ch2f4oratdz6mc2unxis.png)

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sv0xo3fy0lxnu1s1ho86.png)

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qqgt09u1vkdz02ico1az.png)

**Step 6: Configure the inbound ports rule**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i25j1600cqdkda5qrkxw.png)

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

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgrnpzygb2s88ddxek65.png)

**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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tzos3v6pdzo2eaeosn2u.png)

**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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qwpxeh96v89sb6z4qg3z.png)

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/he2hx431guwhx9w92pze.png)




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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2vz1j5cahn935p1ew8ld.png)

**Step 12:** Click **"Create"**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mlhwlxmoebck9islyqsb.png)

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yezad1nymfw7m6kn1a8a.png)

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7qdrnsjjtzrgwoe345l0.png)

**Step 15:** Select **Native SSH**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7gq9q0f3oumkl3a5us85.png)

**Step 17:** **Copy the SSH  command**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6akcau7t1dtv9l3ov0cd.png)

**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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ur362f67c7av0ee4xte.png)

**Step 19:** Execute the **"SSH Command line"**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jkzhsh93hl0wn997me0f.png)

**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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yab0mh4m21pr2ea6h6v3.png)

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 **