|
1 | 1 | --- |
2 | 2 | title: 'Connect to a Linux VM using RDP' |
3 | 3 | titleSuffix: Azure Bastion |
4 | | -description: Learn how to use Azure Bastion to connect to Linux VM using RDP. |
| 4 | +description: Learn how to use Azure Bastion to connect to a Linux VM using RDP via the Azure portal or a specified IP address. |
5 | 5 | author: abell |
6 | 6 | ms.service: azure-bastion |
7 | 7 | ms.topic: how-to |
8 | | -ms.date: 03/31/2025 |
| 8 | +ms.date: 03/12/2026 |
9 | 9 | ms.author: abell |
10 | 10 | ms.custom: |
11 | 11 | - linux-related-content |
12 | | - - sfi-ropc-nochange |
13 | | -# Customer intent: As a cloud administrator, I want to securely connect to a Linux VM using RDP through a Bastion host, so that I can manage my virtual machines without exposing them to external threats. |
| 12 | +# Customer intent: "As a cloud administrator, I want to establish a secure RDP connection to a Linux VM using a Bastion host, so that I can access my virtual machines without exposing them to the public internet." |
14 | 13 | --- |
15 | 14 |
|
16 | 15 | # Create an RDP connection to a Linux VM using Azure Bastion |
17 | 16 |
|
18 | | -This article shows you how to securely and seamlessly create an RDP connection to your Linux VMs located in an Azure virtual network directly through the Azure portal. Azure Bastion provides secure connectivity to all of the VMs in the virtual network in which it's provisioned. Using Azure Bastion protects your virtual machines from exposing RDP/SSH ports to the outside world, while still providing secure access using RDP/SSH. For more information, see [What is Azure Bastion?](bastion-overview.md) |
| 17 | +This article describes how to create a secure RDP connection to your Linux virtual machines using Azure Bastion. You can connect through the Azure portal (browser-based) or via a specified IP address. When you use Azure Bastion, your virtual machines don't require a client, agent, or additional software (other than xrdp on the Linux VM). Azure Bastion securely connects to all virtual machines in the virtual network without exposing RDP/SSH ports to the public internet. For more information, see [What is Azure Bastion?](bastion-overview.md) |
19 | 18 |
|
20 | | -When you use Azure Bastion, your VMs don't require a client or an agent. However, to connect to a Linux VM using RDP, you must install xrdp. See the next section for details. |
| 19 | +To connect to a Linux virtual machine using SSH, see [Create an SSH connection to a Linux VM](bastion-connect-vm-ssh-linux.md). For native client connections using Azure CLI (SSH and tunnel), see [Connect to a VM using a native client](connect-vm-native-client-windows.md). |
21 | 20 |
|
22 | | -## Prerequisites and limitations |
| 21 | +The following diagram shows the dedicated deployment architecture using an RDP connection. |
23 | 22 |
|
24 | | -Make sure you've configured an Azure Bastion host for the virtual network in which the VM resides. For more information, see [Create an Azure Bastion host](./quickstart-host-portal.md). Once the Bastion service is provisioned and deployed in your virtual network, you can use it to connect to any VM in this virtual network. |
| 23 | +:::image type="content" source="./media/connect-vm-rdp-windows/host-architecture-rdp.png" alt-text="Diagram that shows the Azure Bastion architecture." lightbox="./media/connect-vm-rdp-windows/host-architecture-rdp.png"::: |
25 | 24 |
|
26 | | -* The connection settings and features that are available depend on the Bastion SKU you're using. |
| 25 | +## Prerequisites |
27 | 26 |
|
28 | | - * RDP to a Linux VM is only available for the Standard SKU or higher. To check your SKU or upgrade to a higher SKU, see [Upgrade the SKU](upgrade-sku.md). |
29 | | - * To see the available features and settings per SKU, see the [SKUs and features](bastion-overview.md#sku) section of the Bastion overview article. |
| 27 | +Before you begin, verify that you meet the following criteria: |
30 | 28 |
|
31 | | -* To use RDP with a Linux virtual machine, you must also ensure that you have xrdp installed and configured on the Linux VM. To learn how to do this, see [Use xrdp with Linux](/azure/virtual-machines/linux/use-remote-desktop). |
| 29 | +* An Azure Bastion host deployed in the virtual network where the virtual machine is located, or in a [peered virtual network](vnet-peering.md). To set up a Bastion host, see [Create a bastion host](quickstart-host-portal.md#createhost). The SKU you need depends on your connection method: |
32 | 30 |
|
33 | | -* You must use username/password authentication. |
| 31 | + | Connection method | Minimum SKU | Additional configuration | |
| 32 | + |---|---|---| |
| 33 | + | Azure portal (browser) | Standard | None | |
| 34 | + | Azure portal with custom ports | Standard | None | |
| 35 | + | IP-based connection | Standard | [IP-based connection](connect-ip-address.md#sku-requirements) enabled | |
34 | 36 |
|
35 | | -### Required roles |
| 37 | +* **xrdp required:** To use RDP with a Linux VM, you must have [xrdp](https://www.xrdp.org/) installed and configured on the Linux VM. To learn how to do this, see [Use xrdp with Linux](/azure/virtual-machines/linux/use-remote-desktop). |
36 | 38 |
|
37 | | -In order to make a connection, the following roles are required: |
| 39 | +* Azure Bastion uses RDP port 3389 by default. Custom ports require the [Standard SKU or higher](bastion-sku-comparison.md). To upgrade, see [Upgrade a SKU](upgrade-sku.md). |
38 | 40 |
|
39 | | -* Reader role on the virtual machine |
40 | | -* Reader role on the NIC with private IP of the virtual machine |
41 | | -* Reader role on the Azure Bastion resource |
42 | | -* Reader role on the virtual network of the target virtual machine (if the Bastion deployment is in a peered virtual network). |
| 41 | +* A Linux virtual machine in the virtual network (or reachable from the virtual network for [IP-based connections](connect-ip-address.md)). |
43 | 42 |
|
44 | | -### Ports |
| 43 | +* **Required roles:** |
45 | 44 |
|
46 | | -To connect to the Linux VM via RDP, you must have the following ports open on your VM: |
| 45 | + * Reader role on the virtual machine. |
| 46 | + * Reader role on the NIC with the private IP of the virtual machine. |
| 47 | + * Reader role on the Azure Bastion resource. |
| 48 | + * Reader role on the virtual network of the target virtual machine (if the Bastion deployment is in a peered virtual network). |
47 | 49 |
|
48 | | -* Inbound port: RDP (3389) *or* |
49 | | -* Inbound port: Custom value (you'll then need to specify this custom port when you connect to the VM via Azure Bastion) |
| 50 | +* **Ports:** You must have the following ports open on your VM: |
50 | 51 |
|
51 | | -## <a name="rdp"></a>Connect |
| 52 | + * Inbound port: RDP (3389) *or* |
| 53 | + * Inbound port: Custom value (you then need to specify this custom port when you connect to the VM via Azure Bastion). |
52 | 54 |
|
53 | | -[!INCLUDE [Connect to a Linux VM using RDP](../../includes/bastion-vm-rdp-linux.md)] |
| 55 | +See the [Azure Bastion FAQ](bastion-faq.md) for additional requirements. |
| 56 | + |
| 57 | +## Authentication methods |
| 58 | + |
| 59 | +The following authentication method is available for RDP connections to Linux VMs through Azure Bastion. |
| 60 | + |
| 61 | +| Authentication method | Supported connection methods | Minimum SKU | |
| 62 | +|---|---|---| |
| 63 | +| Username and password | Azure portal, IP address (portal) | Standard | |
| 64 | + |
| 65 | +> [!NOTE] |
| 66 | +> Microsoft Entra ID and Kerberos authentication aren't supported for RDP connections to Linux VMs. |
| 67 | +
|
| 68 | +<a name="connect-to-a-vm"></a> |
| 69 | + |
| 70 | +## Connect to a virtual machine using RDP |
| 71 | + |
| 72 | +Select a connection method to see the corresponding steps. |
| 73 | + |
| 74 | +# [Azure portal](#tab/portal) |
| 75 | + |
| 76 | +<a name="rdp"></a> |
| 77 | + |
| 78 | +Use the Azure portal to create a browser-based RDP connection to your Linux virtual machine. This method connects directly through your browser. No native RDP client or additional software is required on your local computer. The [Standard SKU](bastion-sku-comparison.md) or higher is required. |
| 79 | + |
| 80 | +1. In the [Azure portal](https://portal.azure.com), go to the virtual machine that you want to connect to. On the **Overview** page, select **Connect**, then select **Bastion** from the dropdown to open the Bastion page. |
| 81 | + |
| 82 | +1. On the **Bastion** page, expand the **Connection Settings** section and select **RDP**. If you plan to use an inbound port different from the standard RDP port (3389), enter the **Port**. |
| 83 | + |
| 84 | +1. Enter the **Username** and **Password**, and then select **Connect**. The RDP connection to this virtual machine via Bastion opens directly in the browser (over HTML5) using port 443 and the Bastion service. |
| 85 | + |
| 86 | +> [!NOTE] |
| 87 | +> For troubleshooting tips, see [Troubleshooting](troubleshoot.md). |
| 88 | +
|
| 89 | +# [IP address (portal)](#tab/ip-address) |
| 90 | + |
| 91 | +<a name="ip-address"></a> |
| 92 | + |
| 93 | +Use the Azure portal to create a browser-based RDP connection to your Linux virtual machine using a specified IP address. This method connects through your browser and doesn't require a native RDP client or additional software on your local computer. The Standard SKU or higher is required, and you must enable [IP-based connection](connect-ip-address.md). |
| 94 | + |
| 95 | +### Enable IP-based connection |
| 96 | + |
| 97 | +Before you can connect using an IP address, you must enable IP-based connection on your Bastion deployment. |
| 98 | + |
| 99 | +1. In the [Azure portal](https://portal.azure.com), go to your Bastion deployment. |
| 100 | + |
| 101 | +1. On the **Configuration** page, for **Tier**, verify the SKU is set to the **Standard** SKU or higher. If the SKU is set to the Basic SKU, select a higher SKU from the dropdown. |
| 102 | + |
| 103 | +1. Select **IP based connection**. |
| 104 | + |
| 105 | +1. Select **Apply** to apply the changes. It takes a few minutes for the Bastion configuration to complete. |
| 106 | + |
| 107 | +1. You specify the IP address of the target virtual machine directly on the Bastion **Connect** page, rather than selecting a virtual machine from the Azure portal. |
| 108 | + |
| 109 | +### Connect using an IP address |
| 110 | + |
| 111 | +1. To connect to a virtual machine using a specified IP address, make the connection from Bastion, not directly from the virtual machine page. On your Bastion resource, select **Connect** to open the Connect page. |
| 112 | + |
| 113 | +1. On the Bastion **Connect** page, for **IP address**, enter the IP address of the target virtual machine. |
| 114 | + |
| 115 | + :::image type="content" source="./media/connect-ip-address/ip-address.png" alt-text="Screenshot of the Connect using Azure Bastion page." lightbox="./media/connect-ip-address/ip-address.png"::: |
| 116 | + |
| 117 | +1. Adjust your connection settings to the desired **Protocol** (RDP) and **Port**. |
| 118 | + |
| 119 | +1. Enter your credentials in **Username** and **Password**. |
| 120 | + |
| 121 | +1. Select **Connect** to connect to your virtual machine. |
| 122 | + |
| 123 | +--- |
| 124 | + |
| 125 | +## Limitations |
| 126 | + |
| 127 | +* **xrdp requirement:** RDP to a Linux VM requires xrdp to be installed and configured on the target VM. Without xrdp, an RDP connection can't be established. |
| 128 | +* **Authentication:** Only username and password authentication is supported for RDP connections to Linux VMs. Microsoft Entra ID and Kerberos authentication aren't supported. |
| 129 | +* **Native client:** The `az network bastion rdp` command isn't supported for Linux VMs. To connect to a Linux VM using a native client, use `az network bastion ssh` or `az network bastion tunnel` instead. For more information, see [Connect to a VM using Bastion and the Windows native client](connect-vm-native-client-windows.md) or [Connect to a VM using Bastion and a Linux native client](connect-vm-native-client-linux.md). |
| 130 | +* **IP-based connections:** IP-based connection doesn't work with force tunneling over VPN, or when a default route is advertised over an ExpressRoute circuit. Azure Bastion requires access to the Internet and force tunneling, or the default route advertisement, results in traffic blackholing. |
| 131 | +* **IP-based connections:** UDR isn't supported on the Bastion subnet, including with IP-based connections. |
54 | 132 |
|
55 | 133 | ## Next steps |
56 | 134 |
|
57 | | -Read the [Bastion FAQ](bastion-faq.md) for more information. |
| 135 | +* [Connect to a Linux VM using SSH](bastion-connect-vm-ssh-linux.md) |
| 136 | +* [What is Azure Bastion?](bastion-overview.md) |
| 137 | +* [Connect to a VM using Bastion and a Windows native client](connect-vm-native-client-windows.md) |
| 138 | +* [Connect to a VM using Bastion and a Linux native client](connect-vm-native-client-linux.md) |
| 139 | +* [Transfer files](vm-upload-download-native.md) to your virtual machine using a native client. |
| 140 | +* [Configure a shareable link](shareable-link.md) for users without Azure portal access. |
| 141 | +* [Azure Bastion FAQ](bastion-faq.md) |
0 commit comments