Create an RDP connection to a Linux VM using Azure
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. When you use Azure Bastion, your VMs don't require a client, agent, or additional software. You can also connect to a Linux VM using SSH. For information, see Create an SSH connection to a Linux VM.
Azure Bastion provides secure connectivity to all of the VMs in the virtual network in which it is 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 the What is Azure Bastion?.
Note
Using RDP to connect to a Linux virtual machine requires the Azure Bastion Standard SKU.
When using Azure Bastion to connect to a Linux virtual machine using RDP, you must use username/password for authentication.
Prerequisites
Before you begin, verify that you have met the following criteria:
Make sure that you have set up an Azure Bastion host for the virtual network in which the VM resides. For more information, see Create an Azure Bastion host. 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.
To RDP to a Linux virtual machine, you must also ensure that you have xrdp installed and configured on your Linux virtual machine. To learn how to do this, see Use xrdp with Linux.
Required roles
In order to make a connection, the following roles are required:
- Reader role on the virtual machine
- Reader role on the NIC with private IP of the virtual machine
- Reader role on the Azure Bastion resource
Ports
To connect to the Linux VM via RDP, you must have the following ports open on your VM:
- Inbound port: RDP (3389) or
- Inbound port: Custom value (you will then need to specify this custom port when you connect to the VM via Azure Bastion)
Supported configurations
Currently, Azure Bastion only supports connecting to Linux VMs via RDP using xrdp.
Connect
In the Azure portal, navigate to the virtual machine that you want to connect to. On the Overview page, select Connect, then select Bastion from the dropdown.
After you select Bastion, select Use Bastion. If you didn't provision Bastion for the virtual network, see Configure Bastion.
On the Connect using Azure 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.
Enter the Username and Password, and then select Connect to connect to the VM.
The RDP connection to this virtual machine via Bastion will open directly in the Azure portal (over HTML5) using port 443 and the Bastion service.
Note that using keyboard shortcut keys while connected to a VM may not result in the same behavior as shortcut keys on a local computer. For example, from a Windows client computer connected to a Windows VM, "CTRL+ALT+END" is the keyboard shortcut for "CTRL+ALT+Delete". From a Mac client computer connected to a Windows VM, the keyboard shortcut is "Fn+CTRL+ALT+Backspace".
Next steps
Read the Bastion FAQ.
Tilbakemeldinger
Send inn og vis tilbakemelding for