XRDP is a remote desktop service for the LINUX servers which allows us to connect remote Linux desktop systems over Microsoft RDP protocol. XRDP also supports two-way clipboard transfer (text, bitmap, file), audio redirection, and drive redirection (mount local client drives on the remote machines).
To install XRDP, run the following command in the terminal:
Command: apt install xrdp
After installing XRDP, enable the xrdp service by using the following systemctl command:
Command: systemctl enable –now xrdp
To connect with the RDP session you may need to allow the port in firewall which by default is closed. Run the below command to open the port.
Command: ufw enable
Command: sudo ufw allow from any to any port 3389 proto tcp
To test the connection using the Remote Desktop Connection client on Windows, first launch the Remote Desktop Connection app. Enter your remote server’s public IP and username into the fillable text boxes for Computer and User name.
You may need to press the down arrow for Show Options to input the username:
Press the Connect button. If you receive an alert that the Remote Desktop can’t connect to the remote computer, check that you have turned on the Remote Desktop option in your system settings.
Then, enter your remote server’s username and the password you created for user during the initial server setup. Press Ok.
Once you have logged in, you should be able to access your Ubuntu Desktop environment:
Furthemore, default xrdp does not allow root to perform remote desktop connection. So you should have a look at the following file /etc/xrdp/sesman.ini and check if there is any AllowRootLogin option.
Set the value to 1, true or yes to enable root login on terminal server as shown in below screenshot.
In this article, you configured xrdp to connect to a graphical desktop for your remote Ubuntu server over an RDP connection from a local machine.
You may also read:
- How To Reload Your Logstash Configuration File Automatically
- [Kali Linux] Live Host Identification with Netdiscover
- DNS Enumeration with DNSENUM To Find DNS Servers
- SSH Enumeration and Penetration Testing – A Brief Guide
- How to Install Winlogbeat in Windows OS
- [Tutorial] How to Install MobSF on Kali Linux 2022.1
- How To Install Jenkins on Ubuntu Machine
- [Tutorial] How To Install Webmin in Ubuntu
- How to Install Apache Tomcat on Ubuntu Machine
- A Step-by-Step Guide to Installing the LAMP Stack on Ubuntu