Tutorial: Connect to an Azure VM using RDP with Azure Bastion

Learn how to connect to an Azure virtual machine (VM) using Remote Desktop Protocol (RDP) through Azure Bastion. Azure Bastion is a fully managed PaaS service that you deploy within your virtual network.

Bastion provides secure and seamless RDP and SSH connectivity to your virtual machines directly through the Azure portal over TLS. This eliminates the need to expose your virtual machines to the public internet. In this tutorial, you'll connect to a Windows VM.

Prerequisites:
  • An Azure account. If you don't have one, create a free account.
  • A virtual network with at least one subnet.
  • A Windows virtual machine deployed in the virtual network.
  • Azure Bastion deployed in the virtual network. (See Quickstart: Deploy Bastion).

Step 1: Navigate to your VM

Sign in to the Azure portal.

In the Azure portal, navigate to the virtual machine you want to connect to.

Step 2: Connect to the VM

On the Overview page of your virtual machine, select Connect.

In the Connect dropdown, select Bastion.

The Connect using Bastion page appears.

Configure the connection

  1. Host name: This field is pre-populated with your VM name.
  2. Username: Enter the username for your virtual machine.
  3. Password: Enter the password for your virtual machine.

For this tutorial, we assume you have a username and password configured for your VM. If you need to create or reset the password, you can do so via the Reset password option on the VM's blade.

Click Connect.

Step 3: RDP session in the browser

The RDP session will launch directly in your Azure portal browser tab.

You will see the Windows sign-in screen. Enter your username and password, and you will be connected to your virtual machine.

Note: If you have multi-factor authentication (MFA) enabled for your user account, you might be prompted to complete the MFA challenge.

Step 4: Work with your VM

You can now interact with your virtual machine as you normally would via RDP. This includes installing applications, accessing files, and performing administrative tasks.

When you are finished, simply close the browser tab or the RDP window.

Next steps

Congratulations! You have successfully connected to your Azure VM using RDP through Azure Bastion. Here are some next steps: