How to Install XRDP on CentOS and RedHat Linux 8/7

por | 18 mayo, 2023

Introduction

Xrdp is an open-source and freely available Remote Desktop Protocol application which allows remote sessions of Linux Server from Windows machines. It will accept remote connections from rdesktop, freerdp and other remote desktop clients. This article guides, installation and configuration steps of xrdp on CentOS/RedHat Linux 8/7.

Step 1 : Update Server Node

# yum clean all

# yum -y update

After server update, Once restart the server node

# reboot

Step 2: Enable EPEL Repository

xrdp package is available on EPEL repository, so enable it to install on CentOS/RHEL Linux 8.

# yum install epel-release

Step 3: Install Desktop Environment (If it is not installed)

Install GUI (Graphical User Interface) with the following command if is not installed.

# sudo yum groupinstall “Server with GUI”

Step 4: Install xrdp on CentOS/RHEL Linux 8/7

Following mention command to install xrdp applications

# yum install tigervnc-server xrdp

Step 5: Start/Enable and check the Status of xrdp.service

Once xrdp installation is done on the server node, start xrdp server with systemctl command

# sudo systemctl start xrdp.service

# sudo systemctl status xrdp.service

# sudo systemctl enable xrdp.service

Step 6: Check xrdp connection listening on port 3389 by default

xrdp is now listening on port 3389, check with following ss or netstat command below

# netstat -antp | grep xrdp../_images/xrdp1.png

Step 7: Check the status of firewall service on the Server Node

# sudo systemctl status firewalld.service

In case of not in active state, run below command

# sudo systemctl enable firewalld.service

# sudo systemctl start firewalld.service

Add the following rule on Firewall (if the Firewall service is enabled).

# sudo firewall-cmd –permanent –add-port=3389/tcp

# sudo firewall-cmd –reload

At last, again reboot the Server Node via below command

# reboot

Step 7: Access RedHat/CentOS Linux 8/7 system using xrdp

Now, it’s time to take RDP sessions from any Windows machine using Remote Desktop Protocol.../_images/xrdp2.png

The below screen shows that we have successfully taken GUI sessions from Windows machine.