Installing XRDP onto RHEL6 / Red Hat Enterprise Server 

I was told by a senior colleague that XRDP (http://sourceforge.net/projects/xrdp/) is a great way to remotely connect to your Linux servers through windows remote desktop protocol. It extends an XOrg session through through VNC and then the RDP. Here is how you can get it working on RHEL6!

sudo yum install gcc make pam-devel openssl-devel vnc-server autoconf automake libtool libX11-devel libXfixes-devel


wget http://downloads.sourceforge.net/project/xrdp/xrdp/0.6.1/xrdp-v0.6.1.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fxrdp%2F%3Fsource%3Ddirectory&ts=1390846301&use_mirror=softlayer-ams


tar zxvf xrdp-v0.6.1.tar.gz
cd xrdp-v0.6.1
./bootstrap
./configure
make
sudo make install

Add user(s) to the 100, “users” group to allow them to login via RDP

sudo nano /etc/group

Edit iptables to permit inbound RDP

sudo nano /etc/sysconfig/iptables

add

-F INPUT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3389 -j ACCEPT


sudo service iptables restart

Make it a little more secure by enabling 128 bit 2-way encryption

sudo nano /etc/xrdp/xrdp.ini

Change crypt_level=low to crypt_level=high

Generate a new RSA key

sudo /usr/local/bin/xrdp-keygen xrdp auto

Start XRDP up and then try and connect to it using remote desktop client in Windows

sudo /etc/xrdp/xrdp.sh start

Finally make XRDP auto start as a service.

sudo ln -s /etc/xrdp/xrdp.sh /etc/init.d/xrdp
sudo chkconfig --add xrdp
sudo chkconfig xrdp on
sudo service xrdp start