How to Install and Configure xRDP Server on Ubuntu 20.04 for Remote Desktop Access
xRDP is a free and open-source remote desktop protocol (RDP) server that enables users to access a graphical desktop environment of a Linux system remotely. It allows you to connect to your Ubuntu 20.04 server using the standard RDP clients available in Windows, macOS, or other platforms, providing a seamless remote desktop experience similar to working on a local machine. This makes xRDP an ideal solution for system administration, remote work, or accessing Linux applications with a graphical interface. In this tutorial, we will walk you through the process of installing, configuring, and securing the xRDP server on Ubuntu 20.04.
Installing desktop environment
First, we need to provide our Ubuntu server system with a desktop environment. Let’s install Gnome in this example.
Installing and configuring xRDP
To install xRDP package, run:
You also need to grant access to the /etc/ssl/private/ssl-cert-snakeoil.key file for xrdp user. It is available to members of the ssl-cert group by default.
Restart the service.
Firewall configuration
You need to open access on port 3389.
It is more secure to open it only for your IP address or network. For example:
The best practice is to use an SSH tunnel to connect to the remote desktop and make xRDP listen only for local connections.
xRDP connection to Ubuntu server 20.04
Please note that the user who will connect to xRDP must log out before doing so!
It’s time to establish an xRDP connection to your Ubuntu server.
Connect to your server using any RDP client.
Attention: If you are connecting via xRDP, you need to specify a password and root user name. If you are connecting via SSH, you will need the key or password that was configured during the creation of the server in the cloud.
Enter the user credentials of your Ubuntu server.
Now you can see the remote desktop initial screen.