Enable Remote Desktop Access on Kali

To enable Remote Desktop (RDP) access on Kali Linux, you can use xrdp (an open-source RDP server) or VNC. Below are the steps for both methods:

Method 1: Enable RDP with xrdp (Recommended)

Step 1: Update Kali Linux

bash

sudo apt update && sudo apt upgrade -y


Step 2: Install xrdp

bash

sudo apt install xrdp -y


Step 3: Start and Enable xrdp

bash

sudo systemctl enable xrdp --now

sudo systemctl status xrdp  # Check if running


Step 4: Allow RDP Port (3389) in Firewall

bash

sudo ufw allow 3389/tcp


Step 5: Connect from Windows

1. Open Remote Desktop Connection (`mstsc`).  

2. Enter Kali’s IP address (find it with `ip a` or `hostname -I`).  

3. Log in with your Kali username & password.



Method 2: Enable VNC (Alternative)

Step 1: Install TightVNC

bash

sudo apt install tightvncserver -y



Step 2: Start VNC Server

bash

vncserver :1 -geometry 1920x1080 -depth 24


Replace `:1` with a display number (e.g., `:2`).  

Set a VNC password when prompted.


Step 3: Connect via VNC Client

1. Install TigerVNC or RealVNC on your local machine.  

2. Connect to `Kali_IP:1` (e.g., `192.168.1.100:1`).  



Troubleshooting

"Authentication Required" Error?  

  -Run:  

    bash

    sudo sed -i 's/allow_root=true/allow_root=true\nuser=root/' /etc/X11/Xwrapper.config

    

Black Screen on RDP?  

  - Restart xrdp:  

    bash

    sudo systemctl restart xrdp

    


Security Recommendations

Change the default port (edit `/etc/xrdp/xrdp.ini`).  

Use SSH tunneling for secure RDP:  

  bash

  ssh -L 33389:localhost:3389 kali_user@kali_ip

  

  Then connect via `127.0.0.1:33389`.


No comments:

Post a Comment

Fix GRUB dual boot issues after upgrading Kali Linux

To fix GRUB dual boot issues after upgrading Kali Linux, you can either use the command line to update GRUB or use a tool like Boot-Repair. ...