How to install xrdp on kali linux

Remote Desktop Protocol (RDP) is a valuable tool that lets you control a remote computer over a network. On Kali Linux Purple, enabling RDP support can boost your remote management capabilities. One popular solution is XRDP, an open-source RDP server that lets you access your Kali desktop environment remotely using a familiar interface. In this blog, we’ll walk you through how to install XRDP on Kali Linux Purple, so you can efficiently manage your system from anywhere—whether for system administration, development work, or running remote-only applications.

XRDP Installation Step by Step

Before setting up remote access, start by updating your Kali Linux Purple system to ensure all packages are current—this helps avoid issues during installation. Open a terminal and run the following commands:

Note: These steps also work on Ubuntu 20.04 and 22.04.

The first command refreshes the package list to identify available updates and new packages in the repositories. The second command installs XRDP, the open-source Remote Desktop Protocol server, on your system.

				
					sudo apt update
sudo apt install xrdp -y
				
			

Once XRDP is installed, you need to enable and start the XRDP service. You do that by doing the below commands

				
					sudo systemctl enable xrdp
sudo systemctl start xrdp
				
			

Now lets check the status of XRDP. Which is always a good practice to ensure it’s up and running:

				
					sudo service xrdp status
				
			

Creating a User for Remote Access

For XRDP to function properly and securely, it’s recommended to create a separate user account for remote sessions—using the currently logged-in user can lead to conflicts. To set up a dedicated user, run the following command:

The command below creates a new user named tommyegan with a home directory located at /tommyegan.

				
					sudo adduser --home /tommyegan tommyegan
				
			

Granting Administrative Privileges

To give the new user administrative rights, you’ll need to add them to the sudo group. This allows the user to perform tasks that require elevated privileges. Use the following command to do so:

The example below adds a user named tommyegan, to the sudo group.

				
					sudo usermod -aG sudo tommyegan
				
			

Before connecting remotely, you’ll need to identify the IP address of your Kali Linux machine. You can do this by running either of the following commands in the terminal:

  • ifconfig

  • ip addr

These commands will display network information, including the IP address needed for your RDP connection.

Connecting from a Windows Machine

You can connect to your Kali Linux Purple system from any version of Windows that includes Remote Desktop—this includes Windows 10, Windows 11, and Windows Server editions like 2019 and 2022.

With XRDP installed and your user account set up, follow these steps to initiate the connection:

  1. Open the Run Dialog: Right-click the Windows Start button and select Run.

  2. Launch Remote Desktop: Type mstsc and press Enter to open the Remote Desktop Connection application.

  3. Enter the IP Address: In the dialog box, enter the IP address of your Kali Linux machine and click Connect.

  4. Log In: When prompted, enter the username and password of the remote user you created (e.g., apexrdp).


 

Congratulations! You’ve successfully set up XRDP on Kali Linux Purple and can now access your desktop environment remotely from a Windows machine. This setup enhances your flexibility and productivity by allowing you to manage your Kali system from virtually anywhere.

As always, practice good cybersecurity hygiene:

  • Keep your system up to date

  • Use strong, unique passwords

  • Regularly monitor access logs for any suspicious activity

Happy remote managing! Don’t forget to explore other powerful open-source tools that can further strengthen your cybersecurity toolkit.

Share:

More Posts

Send Us A Message