DEV Community

Oziegbe Pierre Okukpon
Oziegbe Pierre Okukpon

Posted on

HOW TO CREATE A LINUX VM AND CONNECT TO IT USING PASSWORD AUTHENTICATION

Creating a Linux virtual machine (VM) on Microsoft Azure and connecting to it using password authentication involves several steps. Here's a basic guide to get you started:

Sign in to the Azure Portal: Go to https://portal.azure.com and sign in with your Azure account.

Create a Virtual Machine:
a) Click on "Create a resource" in the upper-left corner.
b) Search for "Virtual machine" and click on it.
c) Click on "Create" to start the VM creation process.

Basics:
a) Choose your subscription.
b) Create a new resource group or select an existing one.
c) Enter the virtual machine name.
d) Choose a region.
e) Select the desired OS image (choose a Linux distribution).

Image description

Size: Choose the size of the VM according to your requirements. You can start with a basic size and scale up as needed.

Settings:
a) Choose a username for the administrator account.
b) Select "Password" under Authentication type.
c) Enter and confirm the password for the administrator account.

Public Inbound Ports: Open port 22 (SSH) to allow remote access to the VM.

Image description

Review + Create: Review your VM configuration and click on "Create" to start provisioning the VM.

Image description

Wait for Deployment: Azure will now deploy the VM. This process may take a few minutes.

Access the VM:
a) Once the VM is deployed, you can access it using SSH.
b) Use an SSH client such as PowerShell (on Windows) or Terminal (on macOS/Linux) to connect to your VM.
c) Enter the public IP address or DNS name of your VM, along with the username and password you provided during setup.

Image description

d) Replace username with your administrator username and public_ip_address with the public IP address of your VM.

Image description

That's it! You should now be connected to your Linux VM on Azure using password authentication.
Remember to follow best practices for security, such as regularly updating your VM, using strong passwords, and implementing additional security measures as needed.

Top comments (0)