Connecting to Your Ubuntu Server via RDP (Remote Desktop Protocol)


Connecting to Your Ubuntu Server via RDP (Remote Desktop Protocol)


Connecting to Your Ubuntu Server via RDP (Remote Desktop Protocol)


Remote Desktop Protocol (RDP) is a convenient way to access your Ubuntu server’s graphical user interface (GUI) from a remote computer. While Ubuntu primarily relies on SSH for remote access, you can set up RDP to have a more user-friendly experience when interacting with your server.

In this guide, we’ll walk you through the step-by-step process of installing and configuring xrdp, a popular open-source RDP server for Ubuntu. With xrdp, you can establish a secure RDP connection to your Ubuntu server, making it easier to manage tasks and applications with a graphical interface. Let’s get started!

Note: By default, Ubuntu doesn’t support RDP out of the box, so you’ll need to install a third-party application like xrdp for this purpose.

1. Access Your Ubuntu Server: Ensure that you have SSH access to your Ubuntu server. You can use an SSH client like PuTTY on Windows or the terminal on Linux/Mac.

login to ubuntu server

2. Update Packages: Before installing any new software, it’s a good practice to update your package list and upgrade existing packages:

sudo apt update
sudo apt upgrade

         Upgrade ubuntu server

3. Install xrdp: xrdp is an open-source RDP server for Linux that allows you to connect to your Ubuntu server via RDP. You can install it using the following command:

sudo apt install xrdp

Install xrdp on ubuntu

4. Start xrdp Service: After installation, the xrdp service should start automatically. If it doesn’t, you can start it manually:

sudo systemctl start xrdp

5. Enable xrdp to Start on Boot: To ensure xrdp starts automatically on system boot:

sudo systemctl enable xrdp

Enable xrdp on linux

6. Check the Status of xrdp: You can check if xrdp is running without errors using:

sudo systemctl status xrdp

check status of xrdp

7. Allow RDP Port Through Firewall: If you have a firewall enabled, you need to allow incoming connections on the default RDP port, which is 3389:

sudo ufw allow 3389/tcp

allow 3389 tcp on ubuntu

8. Configure the Desktop Environment: By default, xrdp uses the Xfce desktop environment. You can configure it to use other desktop environments like GNOME by creating a `~/.xsession` file:

echo “gnome-session” > ~/.xsession

configure desktop environment for xrdp

Or for Xfce:

echo “xfce4-session” > ~/.xsession

9. Restart xrdp: After configuring the desktop environment, restart the xrdp service:

sudo systemctl restart xrdp

restart xrdp

10. Connect via RDP: On your Windows machine, open the Remote Desktop Connection application. Enter the IP address or hostname of your Ubuntu server and click “Connect.” You will be prompted to enter your Ubuntu server username and password.

login through xrdp

11. Security: For security reasons, consider using SSH tunneling or a VPN to secure the RDP connection further.

That’s it! You should now be able to connect to your Ubuntu server using RDP. Please ensure you have a secure username and password combination, or consider using SSH keys for authentication for enhanced security.


Connecting to Your Ubuntu Server via RDP (Remote Desktop Protocol) (F.A.Q)

Why should I use RDP on my Ubuntu server?

RDP (Remote Desktop Protocol) provides a graphical interface for your Ubuntu server, making it easier to manage and administer, especially if you are more comfortable with GUI-based tools. It’s useful for tasks that require a visual interface, such as managing a desktop environment or certain applications.

Is RDP secure for remote access to my server?

RDP itself is generally secure when configured correctly. However, it’s crucial to take security measures such as strong passwords, firewall rules, and, if possible, tunneling RDP through SSH or using a VPN to add an extra layer of protection to your remote access.

Can I connect to my Ubuntu server from a Windows computer using RDP?

Yes, you can connect to your Ubuntu server using RDP from a Windows computer. Windows includes a built-in Remote Desktop Connection client that can be used for this purpose. Simply enter the server’s IP address or hostname, and you can establish an RDP session.

Are there alternatives to xrdp for setting up RDP on Ubuntu?

Yes, there are alternative RDP servers like TigerVNC and XRDP-PulseAudio-Installer. The choice of RDP server may depend on your specific requirements and preferences. XRDP is commonly used due to its ease of installation and configuration.