Deploying and Connecting to Ubuntu VM using Azure Portal.

Deploying and connecting to Linux machine is never been so easy on azure portal, AZURE automatically generated SSH key  and saves it in key storage for future use, Azure lets you download private key before deploying the VM, lets get started.

Create virtual machine

  • Login to Azure portal.
  • Go to Home, create a resource, Ubuntu Server or type Virtual machine in search and Click Add
  • In the Basics tab, under Project details, make sure the correct subscription is selected and then choose to Create new resource group or select existing.
  • Fill in all the basic details
  • Let’s do  SSH for authentication, you could use existing public key for SSH or New key can be create by Azure portal.
  • Under Inbound port rules > Public inbound ports, choose Allow selected ports and then select SSH (22) and HTTP (80) from the drop-down.
  • Leave the remaining defaults and then select the Review + create button at the bottom of the page.
  • On the Create a virtual machine page, you can see the details about the VM you are about to create. When you are ready, select Create.
  • When the Generate new key pair window opens, select Download private key and create resource. Your key file will be download as azsrini-vm_key.pem. Make sure you know where the .pem file was downloaded, you will need the path to it in the next step.

Connect to Virtual Machine

To connect to VM, you could use SSH, Bastion or RDP,

  1. Go to Virtual Machine that is newly created.
  2. select SSH and provide the private key path , Azure automatically generates Run command ,
  3. Run the command in CMD.

Boooooom Connected….


In this post we learned Deploying and connecting to Linux VM. Hope you enjoyed it , Stay safe.

Useful links :

Thank you
Srinivasa Avanigadda
Twitter : @azsrini

Deploying and Connecting to Ubuntu VM using Azure Portal.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s