0% found this document useful (0 votes)
11 views4 pages

Kali RDP Full Guide

This document provides a step-by-step guide for setting up and managing RDP on Kali Linux, including updating the system, installing the XFCE desktop, and configuring XRDP. It covers optional steps such as adding a dedicated RDP user and opening the firewall, as well as methods for accessing RDP over the internet. Troubleshooting tips for common issues and session management commands are also included.

Uploaded by

All rounder
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

Kali RDP Full Guide

This document provides a step-by-step guide for setting up and managing RDP on Kali Linux, including updating the system, installing the XFCE desktop, and configuring XRDP. It covers optional steps such as adding a dedicated RDP user and opening the firewall, as well as methods for accessing RDP over the internet. Troubleshooting tips for common issues and session management commands are also included.

Uploaded by

All rounder
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Kali Linux RDP Full Setup & Session Management

Guide
1️⃣ Update Kali

sudo apt update && sudo apt upgrade -y

- Ensures all packages are up to date.

2️⃣ Install XFCE Desktop (if not installed)

sudo apt install kali-desktop-xfce -y

- XFCE is lightweight and works well with RDP.

3️⃣ Set XFCE as default for RDP sessions

echo "xfce4-session" > ~/.xsession

- Ensures RDP launches XFCE instead of default Kali desktop.

4️⃣ Install XRDP

sudo apt install xrdp -y

- XRDP provides RDP server functionality for Linux.

5️⃣ Start and enable XRDP

1
sudo systemctl enable xrdp --now
sudo systemctl restart xrdp
sudo systemctl status xrdp # check status

- XRDP service now starts at boot.

6️⃣ Add a dedicated RDP user (optional)

sudo adduser rdpuser

- Enter password and info. Press ENTER to skip optional fields. - Add to sudo group if needed:

sudo usermod -aG sudo rdpuser

7️⃣ Open firewall for RDP (optional)

sudo ufw allow 3389/tcp


sudo ufw enable
sudo ufw status

- 3389 is default RDP port.

8️⃣ Test RDP locally


• Use Windows Remote Desktop Connection ( mstsc ) or xfreerdp from another Linux PC.
• Connect to Kali’s LAN IP with RDP username and password.

9️⃣ Access RDP over Internet


Option 1: Port forwarding - Forward port 3389 on router to Kali’s LAN IP. - Use WAN IP to connect remotely.
⚠️ Only if not CGNAT.

Option 2: Tailscale VPN (recommended)

2
curl -fsSL [Link] | sh
sudo tailscale up

- Use Tailscale IP to connect securely from anywhere.

10️⃣ Troubleshoot blank screen / login issues


• Make sure ~/.xsession contains:

xfce4-session

• Check XRDP logs:

tail -f /var/log/[Link]
tail -f ~/.xsession-errors

• Restart XRDP after changes:

sudo systemctl restart xrdp


sudo systemctl restart xrdp-sesman

11️⃣ Session & User Management

See sessions

loginctl list-sessions

Terminate a session

sudo loginctl terminate-session <SESSION_ID>

Check user processes

ps -u <username>

3
Kill all user processes

sudo pkill -u <username>

Delete user safely

sudo deluser --remove-home <username>

- Optional: remove sudo access only:

sudo deluser <username> sudo

Verify deletion

id <username>
ps -u <username>

- id → should return no such user


- ps → should return nothing

You might also like