This guide will walk you through the steps on installing a xRDP. xRDP is an open source remote desktop protocol(rdp) server that lets you connect to your server on any Windows machine.
For the Auto Installation, you just need to download the xrdp.sh script in your server and need to execute that script. Just run the following commands in your server.(Installation process may take few minutes)
chmod a+x xrdp-installer.sh
Please note: This will not work if you have a CLI based server as it would drop the connection.
Installing EPEL repository and xRDP server
yum -y install epel-release
yum -y install xrdp
Installing MATE desktop
yum groupinstall -y "MATE Desktop"
echo "mate-session" > ~/.Xclients
chmod a+x ~/.Xclients
Add port to firewall
firewall-cmd --permanent --add-port=3389/tcp
To change TLS Version
sed -i 's/ssl_protocols=TLSv1.2, TLSv1.3/ssl_protocols=TLSv1, TLSv1.1/g' /etc/xrdp/xrdp.ini
Starting the Server
systemctl start xrdp.service
Check if it's running
netstat -an | grep 3389
This should fetch you an output similar to:
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN
Auto start the Server on boot
systemctl enable xrdp.service
If you do not have a GUI based server, you can install GNOME Desktop environment.
Install the latest system packages on Ubuntu
apt-get update && apt-get dist-upgrade
apt-get install xrdp
Start xRDP and enable autostart onboot
systemctl start xrdp && systemctl enable xrdp
Create xrdp user and an SSL-Cert
adduser xrdp ssl-cert
systemctl restart xrdp
You can now use the IP of the VPS and connect using Remote Desktop Connection on your Windows machine.
Open the Remote Desktop Application on Windows (or Vinagre if you are on Linux and select RDP),
Enter the VPS IP address in the box marked below and hit connect,
Next you will find this screen open, here type your SSH login details which you used when installing the above packages,
Done! You will be redirected to your MATE GUI Desktop!