How to install xrdp on CentOS 7 / RHEL
7
Install EPEL, xrdp and nux Desktop repository rpms.
# rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
# rpm -Uvh https://li.nux.ro/download/nux/dextop/el7/x86_64/xrdp-0.6.1-3.el7.nux.x86_64.rpm
Once it is installed, lets start the xrdp service.
# systemctl start xrdp.service
The xrdp will listen on 3389, lets confirm this by issuing following command.
# netstat -antup | grep xrdp
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 1508/xrdp
tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 1507/xrdp-sesman
By default, services wont auto start after system reboot. Issue the following command to enable the service at system start up.
# systemctl enable xrdp.service
Next is to create iptables rule to allow rdp connection from the external machines, following command will add the exception for rdp port (3389).
# firewall-cmd --permanent --zone=public --add-port=3389/tcp
# firewall-cmd --reload
Configure SELinux
# chcon --type=bin_t /usr/sbin/xrdp
# chcon --type=bin_t /usr/sbin/xrdp-sesman
Test:
Now take RDP from any windows machine using Remote Desktop Connection, enter IP address of Linux server in computer field and click on connect.
RHEL 7–
xrdp MSTSC
You would be asked to enter the user name and password, you can either use root or any user that you have it on system. Make sure you use module "sesman-Xvnc".
RHEL 7– xrdp Login page
If you click ok, you will see the processing. In less than a half min, you will get a desktop.
RHEL 7 –
xrdp Desktop
That’s All,
you have successfully configured xRDP on CentOS 7 / RHEL 7. We welcome your
comments.
Thanks
ReplyDelete