The Wayback Machine - https://web.archive.org/web/20240120024542/https://www.geeksforgeeks.org/microsoft-azure-accessing-virtual-machines-using-bastion/
Open In App
Related Articles

Microsoft Azure – Accessing Virtual Machines using Bastion

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

In this article, we will learn how to use Azure Baston to access virtual machines. You can use Azure Bastion to connect to your Azure VMs without exposing your VMs to the public Internet. Azure Bastion is a fully managed service used for securing Remote Desktop Protocol (RDP) and Secure Shell Protocol (SSH) access to virtual machines (VMs) that hide your original IP address with a public IP address to avoid exposure. 

Implementation:

Follow the given steps to access Azure VM using Azure Bastion:

Step 1: In Azure VM, we can connect to it with RDP, SSH, and with Bastion. Let’s go with Bastion.

Step 2: The first time we use Bastion with the VM, we have to go through some steps. First, we might need to expand the address range of the VM. 

Step 3: Here, we need to create the Bastion subnet. We will leave the address space as it is. Also, we don’t choose a network security group, but we can if you want to. Create the subnet.

Step 4: We need to create an Azure Bastion resource. The VM uses this to connect and start a session. We have several options. We will leave the name as it is and the pricing tier is set to standard. That’s fine and enables us to scale the number of Bastion units as well. This determines how many users can connect to the VM with the Bastion at the same time. We will leave the rest of the settings as they are. Let’s create it.

Alternatively, we can choose to create an Azure Bastion with my own values independent from this VM.

Step 5: We can now connect to the VM with Bastion. We will just fill in the admin credentials and connect.

There it will go. This will be a secure session with the VM in a browser window. It’s the same as using an RDP or SSH client. Only now, we don’t have to go through the public Internet, and we can remove the public IP address for my VM if we want.

Lost in the complex landscape of DevOps? It's time to find your way! Enroll in our DevOps Engineering Planning to Production Live Course and set out on an exhilarating expedition to conquer DevOps methodologies with precision and timeliness.
What We Offer:
  • Comprehensive DevOps Curriculum
  • Expert Guidance for Streamlined Learning
  • Hands-on Experience with Real-world Scenarios
  • Proven Track Record with 100,000+ Successful DevOps Enthusiasts

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 30 Mar, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials