How To Create a Linux Virtual Machine In Azure
Published: 2023-06-10 14:36:47

How To Create a Linux Virtual Machine In Azure

Creating a Linux Virtual Machine in Azure, using a password-based authentication instead of using SSH access. 

**CREATE YOUR VIRTUAL MACHINE**
a.	Sign into azure environment, in the search bar, type "Virtual Machine, select virtual machine, and then click create.
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d674tdblmsflelouen8v.png)



b.	On the basic page select your virtual machine parameters, select the subscription you are using (e.g. Subscription1), Resource group or you can create new one (e.g. WEBRESOURCE), give your VM a name (JosephVM), select Region as Esat US, availability zone1, select the security type you want and  image as Ubuntu 

 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6dyqjherwtbfvg6az1vr.png)


c.	Select the size of your virtual machine from the drop-down or click on "See all
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i43xe6n2wr9zjj478dmh.png)


d.	Under administrator account Select the password authentication type. Enter username and password.
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hm7p4opgn9c6ey0jw7c6.png)


e.	Under Inbound Port Rules, select SSH (22) as your inbound port to connect to the Linux server. Then Click "Next: Disk>" to direct you to the disk page.
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jsjjm59ja15w20xbj3uq.png)


f.	On the Disk page click on the OS disk type dropdown and select standard SSD or any disk type of your choice as shown below. Leave the other columns as default.
 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlq9dwm8l7lmeajrro29.png)




g.	Leave the networking, management, monitoring and advanced pages as default. 
h.	Next, click on Review+create, Review the summary of your virtual machine configuration and click on the "Create” after validation is passed.

h.	When deployment is complete, click on "Go to resource and click your VM

 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9cwo6yfepdzzz443hmv1.png)



i. When deployment is complete, click on "Go to resource and click your VM.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2hn5jdas59cx6rj60qeg.png)





**CONNECTTING TO YOUR VIRTUAL MACHINE**
a.	From resources page go the VM you just created and Click on the connect button to SSH to your Virtual Machine
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xzs06k7jggy6sqfgqsi0.png)


b.	Scroll down to run the example command in the red box in the blue box. This will give you: ssh username@ipaddress
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rr5u45sitvmk6pwxdta3.png)


c.	Open PowerShell on your Laptop and input the command, On the overview page, you will find lP address to use, type yes when you are ask to.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mqm680labve2yees2r8t.png)

	
 
d.	You then enter your password and click enter, the pic above shows you have successfully log into your VM