If you want to access your Kali Linux machine remotely using a Windows-style RDP client, you can easily set it up using xrdp. In this guide, we’ll walk through the steps to enable RDP on Kali Linux.
Step 1: Update Your System
First, update the package list to ensure you are installing the latest version of packages.
sudo apt update
Step 2: Install XRDP
XRDP is the service that allows Remote Desktop connections.
sudo apt install xrdp -y
Enable and start the xrdp service:
sudo systemctl enable xrdp
sudo systemctl start xrdp
sudo systemctl status xrdp
Step 3: (Optional) Install XFCE Desktop
By default, Kali comes with GNOME, but XFCE works smoothly with RDP.
sudo apt install xfce4 xfce4-goodies -y
echo "startxfce4" > ~/.xsession
sudo systemctl restart xrdp
Step 4: Check Firewall Rules
By default, Kali allows all ports. You can verify with:
sudo iptables -L -n
If you’re using UFW, enable it and allow port 3389 (the default RDP port):
sudo apt install ufw -y
sudo ufw enable
sudo ufw allow 3389/tcp
Step 5: Connect via RDP Client
Now, from a Windows or Linux system, open an RDP client (like mstsc on Windows) and connect to your Kali Linux machine using its IP address:
mstsc
Enter the IP and credentials of your Kali Linux user, and you should now be able to access your desktop remotely.
✅ That’s it! You have successfully enabled RDP in Kali Linux. This setup is useful for remote administration, penetration testing labs, or simply managing your machine without direct access.