Azure Virtual Machines (VMs) can be easily created using the Azure portal, a browser-based interface for managing Azure resources. This guide will show you how to deploy a Linux VM running Ubuntu Server 22.04 LTS and connect to it via SSH to install the NGINX web server.
Step 1: Sign in to Azure
Sign in to the https://portal.azure.com/
Step 2: Create virtual machine
- Search for Virtual machine
- Select the subscription and resource group
- Select the virtual machine name, region, availability options, security type. Image should be Ubuntu
- Size
- Under Administrator account, select SSH public key.
In Username enter azureuser.
For SSH public key source, leave the default of Generate new key pair, and then enter VirtualVM2_key for the Key pair name.
Review and create
- 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.
- Click on download private key and create resource. The file will be download as VirtualVM2_Key.pem. Go ahead and copy the key for the next step
Your
When the deployment is finished, select Go to resource.
On the page for your new VM, select the public IP address and copy it to your clipboard.
Step 3: Connect to Virtual Machine
- When the deployment is finished, select Go to resource.
On the page for your new VM, select the public IP address and copy it to your clipboard.
Create an SSH connection with the VM on your power shell using the following command prompt
The pem key and the public IP address
Respond with a yes
sudo apt-get -y install nginx
Top comments (0)