DEV Community

Cover image for "Deploying and Connecting to an Ubuntu Linux VM on Azure via Native SSH
Kolarinde Awopetutimileyin
Kolarinde Awopetutimileyin

Posted on

"Deploying and Connecting to an Ubuntu Linux VM on Azure via Native SSH

Step 1 — Configure VM Basics


On the Create a virtual machine page, select your subscription and create a new resource group (named clearly, e.g. "Newkola-RG(Linux)"). Give the VM a unique name, choose your region (West US 2), leave availability/security type at default, and select Ubuntu Server 24.04 LTS – x64 Gen2 as the image. Confirm the architecture (x64) and choose a VM size that fits your workload, then select Password as the authentication type.

Step 2 — Set Administrator Credentials & Inbound Ports


Under Administrator account, create a username and a strong password (confirm it). In Inbound port rules, choose "Allow selected ports" and select SSH (22) from the dropdown so the VM accepts SSH connections from outside.

Step 3 — Review and Create the VM


On the Review + create tab, confirm validation has passed and review the estimated hourly price. Accept the marketplace terms, then click Create to begin deployment.

Step 4 — Confirm Deployment

Once deployment finishes, the "Your deployment is complete" confirmation appears. Click Go to resource to open the newly created VM.

Step 5 — Open the Connect Panel


From the VM's Overview page, click the Connect dropdown at the top to view available connection methods.

Step 6 — Copy the SSH Command (Password Auth)


On the Connect page under Native SSH, verify the destination VM's public IP and port (22), then copy the pre-built SSH command (e.g. ssh username@publicIP) and paste it into your local terminal/command prompt to connect.

Step 7 — Connect Using an SSH Private Key (Alternate Method)


For VMs configured with SSH key authentication, go to Connect on the VM, click Edit settings, and paste the path to your downloaded .pem private key file (e.g. C:\Users<user>\Downloads<key-name>.pem). Azure then generates the full SSH command with the key path included — copy this and run it in your local command prompt to log in.

Top comments (0)