Saturday, April 15, 2023

How to create Ubuntu 20.0.4 Virtual Machine (VM) in Azure? | Create Ubuntu 20.0.4 VM in Azure | How to connect to Azure VM from your local machine

How to Create Ubuntu 20.0.4 Virtual Machines(VM) in Azure portal? Creating Virtual Machine is easy and straight forward in Azure Cloud. Let us see how to do that in Azure portal. 

Pre-requisites:

  • Azure account subscription, click here if you dont have one.
Watch Steps in YouTube channel:


Steps to create Ubuntu 20.0.4 Virtual Machine in Azure
 
1. Login to Azure portal, go to https://portal.azure.com/
2. Click on Virtual Machines.

3. Click on Add virtual machine.

 

4. Now enter the details as below or give values per your subscription and requirements. Select Ubuntu 20.0.4 VM


5. choose authentication type as SSH public key, enter azureuser as user name, enter key pair name.
This step will eventually create SSH keys and allow you to download in your machine.



6. Under Networking


Go with Allow selected ports - SSH port 22
And also select Delete public IP and NIC when VM is deleted option


7. Click on Review, it may take a few mins to finish the validations. If all good, it should pass the validations. Click on Create.

8.  Now download the SSH keys and save it locally.
 

9. Once created, Click on virtual machines.

10. You should see the new VM is running like below:


How to connect to Azure VM from your local machine?



11. Now select that instance, click on connect


Then choose SSH 


12. Copy the value as it shows below in your local terminal(iTerm for Apple laptop) or Git bash for Windows laptop.

13. Make sure your SSH keys is not accessible by others, by executing the below command:

chmod 400 myUbuntuVM_key.pem
14. Now ssh into VM from your local machine using the key

ssh -i myUbuntuVM_key.pem azureuser@your_ip_address


Now it should show you that you are connected to Azure.

No comments:

Post a Comment

Automate Azure App Service setup using Ansible and Azure DevOps pipeline | How to integrate Ansible with Azure DevOps | How to Create WebApp in Azure Cloud using Ansible

Ansible is an open-source, configuration management tool that automates cloud provisioning, configuration management, and application deploy...