Mon, April 6, 2020 ยท 2 min read

How to Configure XRDP in Ubuntu and Centos.

How to Configure XRDP in Ubuntu and Centos.

Xrdp is an open source tool which allows users to access the Linux remote desktop via Windows RDP. Apart from Windows RDP, xrdp tool also accepts connections from other RDP clients like FreeRDP, rdesktop and NeutrinoRDP.

XRDP REQUIREMENTS

  • xrdp and xorgxrdp packages
  • Listens on 3389/tcp. Make sure your firewall accepts connections

1. Installing on Ubuntu 18.04

sudo apt install xrdp

After Installing Restart the xrdp

systemctl restart xrdp

Check the status of xrdp Before connecting to it:

systemctl status xrdp

Xrdp works with port 3389 so make sure to open it. UFW is disabled by default so you will need to enable the firewall and create a rule for xrdp

ufw enable
ufw allow 3389/tcp

2. Installing XRDP on Centos7

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Now install xrdp packages

yum update && yum -y install xrdp tigervnc-server

Add firewall rule to allow xrdp on port 3389 and reload it

firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload

Restart the service

systemctl enable xrdp && systemctl restart xrdp

3. Connect to Windows using Remote Desktop Connection

On you windows machine goto start->search for remote connection

OR

Press windows+r -> mstsc -> enter

4. Connecting to your Rdp client from windows

You will need to enter the ip address of your machine and you will be asked to enter the username and Click on connect

After providing the correct credentials, you get the following page prompting for password.

Now confirm your credentials. You can see the IP address of my Ubuntu on the top and the login page. Enter your password and enjoy