Hi there,
I would like to walk you through on how you can create an Azure Linux Virtual Machine and connecting to it using SSH.
A Virtual machine (VM) is a software computer used as emulation of an actual physical computer. It includes virtual processor, memory, storage and networking. VMs are known for their flexibility and portability and provides many benefits, such as: cost savings, agility and speed, lowered downtime, scalability and security benefits.
For creating Azure VM, you will need to have a valid Azure account. If you do not have one, create using Azure Portal for free.
- From the search box, type in virtual machines. Under Services, select Virtual machines.
- Select create shown on the upper left side and then Virtual machine. The Create a Virtual machine page opens.
- On the basics tab, fill in the following See below on how I filled out the details
- Leave the remaining defaults and select the Review + Create
- Click on create once validation is passed.
- Once you click on create, you would be prompted to download private key and create resource. Select and wait for it to download. Make sure you know where the file was downloaded, you will need the path to it in the next step.
- After downloading, it will immediately submit the deployment template for the resource group. Once deployment is complete, select Go to resource Connect to Virtual Machine
- On the overview page of the Virtual machine, select the Pubic IP address
- Change the IP address assignment from dynamic to static and click on save afterwards
- Connect to the VM using SSH
- Copy out the highlighted command in 4 and paste it in your notepad Note the following
- Go to your notepad where you pasted the command highlighted in yellow above
- Also, go to your downloads on your PC and right click the key PEM file download and select properties
- Copy out the key and the location name separately to the note pad opened earlier
- Merge the key and location name into one with a backlash
- Copy the above to the on the command pasted before
Open Windows PowerShell and copy and paste the SSH keypair above.
To run a command as administrator 'root user', type sudo su. To confirm it is an Ubuntu type of Linux, run the command apt update.
Let me know if this was helpful. I love feedback😊
Top comments (0)