How to Enable RDP on Kali Linux (Complete Remote Desktop Guide)

Explore the advanced features of Kali RDP with our easy-to-use guide. Click now to learn and master Kali RDP effectively!

Updated: 30 Jul, 25 by Lisa P 9 Min

List of content you will read in this article:

If you’re a penetration tester, ethical hacker, or system admin running headless servers, learning how to enable RDP on Kali Linux is essential for secure and efficient remote access. In this comprehensive guide, you’ll discover step-by-step instructions for Kali RDP setup, install the right desktop environment, configure your firewall, secure your session, and troubleshoot common RDP issues.

Before you dive in, make sure you understand What is Kali Linux and why Kali remote desktop connections (RDP) can be a game changer for your workflows.

 

While many Linux professionals prefer SSH for remote connections, using RDP with Kali Linux has specific advantages. A Kali RDP setup lets you run GUI-based security tools, manage files visually, and operate penetration testing labs from anywhere, even connect to Kali from a Windows or macOS machine.

Here are some practical use cases:

  • Running GUI-based pentesting tools that don’t work well in headless mode.
  • Managing multiple Kali virtual machines or servers without a direct display.
  • Accessing your Kali machine from different OS clients using the familiar Remote Desktop Protocol.
  • Using graphical file managers or editors when needed.

To better understand how Kali remote desktop works in general, check out What is RDP for a quick primer.

 

Before you enable RDP on Kali Linux, ensure you have:

  • A running instance of Kali Linux with sudo privileges.
  • An active internet connection for installing packages.
  • Firewall access to open the default RDP port 3389/tcp.
  • A Remote Desktop client, like mstsc (Windows) or Remmina (Linux/macOS).

By default, xrdp, the service that makes Kali RDP possible, works best with a lightweight desktop environment like XFCE. GNOME or KDE can cause session bugs like black screens or login loops.

Install XFCE Desktop Environment on Kali

Follow these steps to install XFCE and its terminal output:

sudo apt update

sudo apt install -y xfce4 xfce4-goodies

You should see packages being unpacked and configured. This ensures you have a complete GUI ready for remote sessions.

Optional: Install MATE or GNOME

If you prefer MATE:

sudo apt install -y mate-desktop-environment

Keep in mind that XFCE is generally more stable for RDP sessions. For more guidance on Linux remote desktops in general, refer to Linux Remote Desktop.

 

Now that your desktop environment is ready, it’s time to install xrdp Kali Linux— the server that handles RDP sessions on Kali.

Step-by-Step with Commands

Update your package list:

sudo apt update

Install xrdp:

sudo apt install -y xrdp

Enable and start the xrdp Kali Linux service:

sudo systemctl enable xrdp

sudo systemctl start xrdp

To verify it’s running:

sudo systemctl status xrdp

Look for active (running) in the output.

 

It’s critical to allow the RDP port through your firewall. If you’re using ufw, run:

sudo ufw allow 3389/tcp

sudo ufw reload

sudo ufw status

You should see:

3389/tcp                   ALLOW       Anywhere

This ensures your RDP connection won’t get blocked by default security rules.

 

By default, the xrdp service starts automatically on boot if you run:

sudo systemctl enable xrdp

To restart the service after changes:

sudo systemctl restart xrdp

If you run into issues, check the logs:

sudo tail -f /var/log/xrdp.log

 

Once Kali RDP is live, you’ll want to connect using an RDP client.

Connect Kali Remotely Using mstsc (Windows)

  1. Press Win + R, type mstsc, and hit Enter.
  2. Enter your Kali server’s IP address and click Connect.
  3. Enter your Kali username/password when prompted.
  4. You should see your XFCE Kali RDP desktop load up.

Using Remmina or MS RDP on macOS

On Linux/macOS:

  • Install Remmina (sudo apt install remmina) or download Microsoft Remote Desktop from the Mac App Store.
  • Enter the same IP address, credentials, and enjoy remote GUI access.

Want more tips for your remote desktop connection? See How to Enable Remote Desktop Connection for related instructions.

 

RDP on Kali Linux is not secure by default. Follow these best practices:
✅ Use SSH tunneling to encrypt your RDP session.
✅ Change the default RDP port from 3389 to something custom.
✅ Install Fail2Ban to block repeated failed login attempts:

sudo apt install fail2ban

✅ Always keep your system updated to patch vulnerabilities.

 

While RDP is popular, you might want to try other remote access tools:

  • VNC: Good for cross-platform GUI access, but less secure without SSH tunneling.
  • NoMachine: Smooth for multimedia, but needs more resources.
  • X2Go: Ideal for low-bandwidth connections and performs better than VNC in some cases.

Compare these in our full Linux Remote Desktop guide.

 

Enabling RDP on Kali Linux means you’ll need to ensure your firewall isn’t blocking incoming connections on the default RDP port, 3389. For this, the ufw (Uncomplicated Firewall) tool is the simplest option.

Step 1: Enable ufw if it’s not already active:

sudo ufw enable

Step 2: Allow RDP traffic on port 3389:

sudo ufw allow 3389/tcp

Step 3: Check your firewall status to confirm:

sudo ufw status

Tip: If you are running iptables instead, use:

sudo iptables -A INPUT -p tcp --dport 3389 -j ACCEPT

To learn more about Linux firewall and remote desktop configurations, check out our guide on Linux Remote Desktop for broader options and tips.

 

After installing xrdp and configuring your desktop environment, it’s time to start the service and make sure it runs on boot.

sudo systemctl start xrdp

sudo systemctl enable xrdp

Check the status:

sudo systemctl status xrdp

You should see active (running) if everything is configured correctly.

 

Now you’re ready to connect. Here’s how:

Using Remote Desktop Connection (Windows)

  1. Open Remote Desktop Connection (mstsc).
  2. Enter the IP address of your Kali Linux machine.
  3. Click Connect.
  4. Log in using your Kali username and password.

 

Using Remmina or MS RDP on macOS

For macOS or Linux clients, Remmina or Microsoft Remote Desktop works perfectly.

Install Remmina:
sudo apt install remmina -y

  1. Launch Remmina and create a new RDP connection.
  2. Enter the Kali IP, username, and password.
  3. Click Connect.

💡 If you need an overview of what RDP is and how it works in general, read our in-depth article: What is RDP.

 

By default, RDP is not encrypted end-to-end. To secure it:

Use SSH Tunneling: Forward RDP over SSH for an encrypted channel.

ssh -L 3389:localhost:3389 user@your-kali-ip

Change Default Port: Modify /etc/xrdp/xrdp.ini to use a custom port.

Fail2Ban: Protect against brute force attacks:

sudo apt install fail2ban -y

Use Strong Passwords: Avoid using default or weak passwords.

For more advanced secure connection Kali RDP setups, check our detailed guide on How to Enable Remote Desktop Connection.

 

RDP not working Kali? Here’s how to fix common issues:

Issue

Solution

Black screen

Ensure you have XFCE installed and selected as your session.

Login loop

Restart xrdp service and check .Xauthority permissions.

Session disconnect

Try changing your desktop environment; XFCE Kali RDP is more stable for xrdp.

Can’t connect

Confirm your firewall allows port 3389 and check your local network settings.

 

While RDP is popular, you may want to explore other options:

  • VNC: Good for persistent sessions, but can be less secure if not tunneled over SSH.
  • X2Go: Excellent performance over slow networks; works well with XFCE and MATE.
  • NoMachine: Feature-rich but heavier on resources.

To understand all your remote access options, read our comprehensive Linux Remote Desktop guide.

 

Enabling RDP on Kali Linux can dramatically improve your workflow, especially when managing remote penetration testing labs or working on headless Kali RDP setups. By following this step-by-step guide, you can enable RDP on Kali Linux, secure your connection, and troubleshoot common issues with ease.

Want more ways to get the best out of your remote desktop setup? Check out:

Yes, you can use RDP (Remote Desktop Protocol) on Kali Linux. Follow the provided steps to set up and configure RDP for efficient remote access to your Kali Linux machine.

Yes, there is a Linux-compatible RDP solution. Kali Linux supports XRDP (X Remote Desktop Protocol) for establishing remote desktop connections. Explore the guide for detailed instructions on setting up Linux RDP.

Enabling XRDP in Kali Linux involves installing and configuring the XRDP package. Follow the guide to ensure a smooth setup, including steps to start the XRDP service and configure firewall settings.

To install Remmina in Kali Linux, use the command `sudo apt install remmina`. This optional step enhances the RDP experience on your Kali machine. Further details and usage are outlined in the provided guide.

By default, RDP uses port 3389. Always check your firewall to ensure it’s open.

XFCE Kali RDP is lightweight and works seamlessly with xrdp.

This usually means your desktop environment isn’t installed properly. Reinstall XFCE and restart xrdp.

Yes, but they often cause session errors. XFCE or MATE are more stable choices.

Use SSH tunneling, change the default port, enable a firewall, and set up Fail2Ban.

Lisa P

Lisa P

Hello, everyone, my name is Lisa. I'm a passionate electrical engineering student with a keen interest in technology. I'm fascinated by the intersection of engineering principles and technological advancements, and I'm eager to contribute to the field by applying my knowledge and skills to solve real-world problems.