Skip to content

Commit 23c46db

Browse files
committed
Learn Editor: Update use-remote-desktop.md
1 parent 6a0b66a commit 23c46db

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

articles/virtual-machines/linux/use-remote-desktop.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ ms.service: virtual-machines
77
ms.collection: linux
88
ms.workload: infrastructure-services
99
ms.topic: how-to
10-
ms.date: 07/25/2022
10+
ms.date: 03/28/2023
1111
ms.author: mattmcinnes
12-
1312
---
13+
1414
# Install and configure xrdp to use Remote Desktop with Ubuntu
1515

1616
**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Flexible scale sets
@@ -21,27 +21,29 @@ The article was written and tested using an Ubuntu 18.04 VM.
2121

2222
## Prerequisites
2323

24-
This article requires an existing Ubuntu 18.04 LTS VM in Azure. If you need to create a VM, use one of the following methods:
24+
This article requires an existing Ubuntu 18.04 LTS or Ubuntu 20.04 LTS VM in Azure. If you need to create a VM, use one of the following methods:
2525

2626
- The [Azure CLI](quick-create-cli.md)
2727
- The [Azure portal](quick-create-portal.md)
2828

2929

3030
## Install a desktop environment on your Linux VM
3131

32-
Most Linux VMs in Azure do not have a desktop environment installed by default. Linux VMs are commonly managed using SSH connections rather than a desktop environment. There are various desktop environments in Linux that you can choose. Depending on your choice of desktop environment, it may consume one to 2 GB of disk space, and take 5 to 10 minutes to install and configure all the required packages.
32+
Most Linux VMs in Azure do not have a desktop environment installed by default. Linux VMs are commonly managed using SSH connections rather than a desktop environment, however there are several desktop environments that you can choose to install. Depending on your choice of desktop environment, it will consume up to 2 GB of disk space and take up to ten minutes to both install and configure all the required packages.
3333

34-
The following example installs the lightweight [xfce4](https://www.xfce.org/) desktop environment on an Ubuntu 18.04 LTS VM. Commands for other distributions vary slightly (use `yum` to install on Red Hat Enterprise Linux and configure appropriate `selinux` rules, or use `zypper` to install on SUSE, for example).
34+
The following example installs the lightweight [xfce4](https://www.xfce.org/) desktop environment on an Ubuntu VM. Commands for other distributions vary slightly (use `yum` to install on Red Hat Enterprise Linux and configure appropriate `selinux` rules, or use `zypper` to install on SUSE, for example).
3535

3636
First, SSH to your VM. The following example connects to the VM named *myvm.westus.cloudapp.azure.com* with the username of *azureuser*. Use your own values:
3737

38+
3839
```bash
3940
4041
```
4142

4243
If you are using Windows and need more information on using SSH, see [How to use SSH keys with Windows](ssh-from-windows.md).
4344

44-
Next, install xfce using `apt` as follows:
45+
Next, install xfce using `apt` :
46+
4547

4648
```bash
4749
sudo apt-get update
@@ -50,7 +52,7 @@ sudo apt install xfce4-session
5052
```
5153

5254
## Install and configure a remote desktop server
53-
Now that you have a desktop environment installed, configure a remote desktop service to listen for incoming connections. [xrdp](http://xrdp.org) is an open source Remote Desktop Protocol (RDP) server that is available on most Linux distributions, and works well with xfce. Install xrdp on your Ubuntu VM as follows:
55+
Now that you have a desktop environment installed, configure a remote desktop service to listen for incoming remote access connections. [xrdp](http://xrdp.org) is an open source Remote Desktop Protocol (RDP) server that is available on most Linux distributions and works well with xfce. Install xrdp on your Ubuntu VM as follows:
5456

5557
```bash
5658
sudo apt-get -y install xrdp
@@ -85,6 +87,7 @@ sudo passwd azureuser
8587
> Specifying a password does not update your SSHD configuration to permit password logins if it currently does not. From a security perspective, you may wish to connect to your VM with an SSH tunnel using key-based authentication and then connect to xrdp. If so, skip the following step on creating a network security group rule to allow remote desktop traffic.
8688
8789

90+
8891
## Create a Network Security Group rule for Remote Desktop traffic
8992
To allow Remote Desktop traffic to reach your Linux VM, a network security group rule needs to be created that allows TCP on port 3389 to reach your VM. For more information about network security group rules, see [What is a network security group?](../../virtual-network/network-security-groups-overview.md) You can also [use the Azure portal to create a network security group rule](../windows/nsg-quickstart-portal.md).
9093

@@ -125,7 +128,6 @@ Add-AzNetworkSecurityRuleConfig @params | Set-AzNetworkSecurityGroup
125128
```
126129

127130
---
128-
129131
## Connect your Linux VM with a Remote Desktop client
130132

131133
Open your local remote desktop client and connect to the IP address or DNS name of your Linux VM.
@@ -140,9 +142,11 @@ After authenticating, the xfce desktop environment will load and look similar to
140142

141143
![xfce desktop environment through xrdp](./media/use-remote-desktop/xfce-desktop-environment.png)
142144

145+
143146
If your local RDP client uses network level authentication (NLA), you may need to disable that connection setting. XRDP does not currently support NLA. You can also look at alternative RDP solutions that do support NLA, such as [FreeRDP](https://www.freerdp.com).
144147

145148

149+
146150
## Troubleshoot
147151
If you cannot connect to your Linux VM using a Remote Desktop client, use `netstat` on your Linux VM to verify that your VM is listening for RDP connections as follows:
148152

@@ -174,7 +178,9 @@ Other Linux distributions such as Red Hat Enterprise Linux and SUSE may have dif
174178
If you do not receive any response in your remote desktop client and do not see any events in the system log, this behavior indicates that remote desktop traffic cannot reach the VM. Review your network security group rules to ensure that you have a rule to permit TCP on port 3389. For more information, see [Troubleshoot application connectivity issues](/troubleshoot/azure/virtual-machines/troubleshoot-app-connection).
175179

176180

181+
177182
## Next steps
178183
For more information about creating and using SSH keys with Linux VMs, see [Create SSH keys for Linux VMs in Azure](mac-create-ssh-keys.md).
179184

180185
For information on using SSH from Windows, see [How to use SSH keys with Windows](ssh-from-windows.md).
186+

0 commit comments

Comments
 (0)