LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Friday, March 22, 2024

Connecting Debian/Ubuntu VPS from Windows Using RDP

0 comments
Are you seeking a convenient way to access your Ubuntu Virtual Private Server (VPS) from your Windows machine? Remote Desktop Protocol (RDP) offers a seamless solution and setting it up is simpler than you might expect. In this comprehensive guide, we'll take you through each step of the  process, ensuring a smooth and hassle-free setup.

Install a Desktop Environment on Your VPS

Begin by installing a desktop environment on your Ubuntu VPS. We'll use XFCE4 for this purpose:

sudo apt update
sudo apt install xfce4

Installing xrdp on Ubuntu

Next, we'll install xrdp, the RDP server for Linux, on your Ubuntu VPS. Execute the following commands in your terminal:

sudo apt update
sudo apt install xrdp -y
sudo systemctl status xrdp

These commands will install xrdp and initiate the service. Verify its status to ensure it's running smoothly.

Configuring xrdp Port (Optional)

By default, xrdp listens for incoming connections on port 3389. If you prefer using a different port for security reasons, follow these steps:

Edit the xrdp configuration file using a text editor (e.g., nano):

sudo nano /etc/xrdp/xrdp.ini

Locate the port directive in the [Globals] section and set your desired value (e.g., port=49952).

Restart the xrdp server to apply the changes:

sudo systemctl restart xrdp

Open a Port for Incoming Traffic in ufw

To allow incoming RDP connections through the firewall, follow these instructions:

Check the status of the ufw firewall:

sudo ufw status

If it's inactive, enable it:

sudo ufw enable

Allow traffic on the desired port (e.g., 49952 for RDP):

sudo ufw allow 49952/tcp

Feel free to modify the port number if necessary.

Reload the ufw firewall to apply the changes:

sudo ufw reload

Congratulations! You've successfully configured your Ubuntu VPS to accept incoming RDP connections. Now, you can utilize the Remote Desktop client on your Windows machine to connect to your VPS using its IP address and the configured port.

Setting up RDP access enhances the manageability of your Ubuntu VPS, enabling you to perform tasks remotely with utmost convenience. Whether you're a developer, system administrator, or simply an enthusiast, this straightforward setup can significantly streamline your workflow and boost productivity.

No comments:

Post a Comment