remote desktop on kali linux

Remote Desktop Protocol (RDP) is a crucial component of safe remote access solutions since it allows users to connect to computers remotely. Although RDP is most commonly used in Windows contexts, it can also be used to connect to a remote Linux machine.

Yes, you can connect to and manage a Kali Linux desktop from a remote location. Notably, RDP ensures an encrypted channel between the Kali machine and the connecting client, thereby fortifying the security of remote access.

Using Kali Linux?

You are in the right place. I will guide you through the steps to make a safe and effective remote connection to your Kali Linux desktop.


Before enabling RDP, make sure that:

  • You have Kali Linux installed and updated to the latest version. Kali 2023 updates include:
  • Kernel 5.19
  • Mesa 22.2.2
  • X.Org Server 21.1.3
  • GCC 12.2
  • Glibc 2.36
  • More tools from Metasploit 6.3.5 like web delivery and windows/gather/forensics modules
  • Your Kali Linux machine has a graphical desktop environment like Xfce or GNOME installed.
  • Your local network firewall allows connections over port 3389 which is used by RDP.

Install Remote Desktop on Kali

First, we need to install the RDP server package xrdp on Kali Linux.

Open a terminal and type:

sudo apt update
sudo apt install xrdp

This will install the xrdp package along with all the required dependencies.

installing xrdp on kali linux

Next, we need to configure the xrdp service to start automatically on system boot:

sudo systemctl enable xrdp
sudo systemctl start xrdp

This will start the xrdp service and configure it to auto-start at boot time.

Set a Password for the xrdp User

By default, xrdp uses a generic xrdp user account to login to the Kali desktop. We should set a password for this user:

sudo passwd xrdp

Set a strong password when prompted. This password will be used to login to Kali via RDP.

Allow RDP Through Firewall

If you have a firewall like ufw enabled on Kali, allow RDP traffic through port 3389:

sudo ufw allow 3389

This opens up port 3389 so that RDP connections can come through.

sudo ufw allow 3389

Connect to Kali Linux via RDP

We are now ready to connect to the Kali desktop using RDP.

On Windows, go to Start > Search for Remote Desktop Connection.

Launch the Remote Desktop Connection app.

Enter the IP address of your Kali Linux machine, check the box for “Allow me to save credentials”, and click Connect.

Enter the xrdp username and password you configured earlier.

You should now see the Kali Linux desktop. You can access the Kali desktop environment just like you would on a local machine.

remote desktop to kali linux

Enabling Remote Desktop with VNC

An alternative to xrdp is using VNC for remote desktop access. Here’s how to set up Kali Linux for VNC connections:

  1. Install a VNC server on Kali:
   sudo apt install tightvncserver
installing vnc server
  1. Start a VNC session:
setup vnc server

Set a password when prompted.

  1. Open port 5901 on the firewall:
   sudo ufw allow 5901 
  1. Download the VNC viewer for the remote computer.
  2. Connect using Kali IP, port 5901, and VNC password.

VNC provides remote access similar to RDP but uses the RFB protocol instead.

Troubleshooting Remote Desktop

Here are some common troubleshooting steps if you are unable to connect to Kali via remote desktop:

  • Confirm the xrdp service is running on Kali – sudo systemctl status xrdp
  • Check if port 3389 is open using sudo netstat -plnt | grep 3389
  • Try restarting the xrdp service – sudo systemctl restart xrdp
  • Temporarily disable the firewall with sudo ufw disable to see if that is blocking connections.
  • Verify that your network allows TCP connections on port 3389.
  • Make sure you are using the correct login credentials for xrdp.
  • Check your RDP client to confirm the Kali IP address is correctly entered.

Restarting xrdp and temporarily disabling the firewall are common ways to troubleshoot remote desktop issues.


Configuring xrdp on Kali Linux provides a straightforward way to securely access the Kali desktop from Windows or other OSes.

After installing xrdp, allowing the firewall port, and setting RDP credentials, you can productively work on the Kali machine from anywhere.

VNC is also an option for remote access using a virtual desktop instead of RDP.

Some key takeaways:

  • Install xrdp on Kali and enable system startup
  • Open firewall for port 3389
  • Set a username/password for xrdp login
  • Connect via Windows Remote Desktop app or VNC client
  • Troubleshoot connectivity issues like xrdp service or firewall port

With these tips, you can enable remote desktop on your Kali Linux install and control it conveniently from other devices. This gives you the flexibility to administer and use your Kali machine from anywhere.

Happy remote desktop!

Other Topics:

Similar Posts