Kali Linux

How to Access Kali Desktop Using Remote Desktop Protocol

In today’s world, accessing the remote machine using rdp (remote desktop protocol) is one of the widely used methods. It enables us to access the remote desktop of the remote machine anywhere without having access to a physical machine. It is used for team collaboration, administrative users to manage the system remotely, remote support, managing applications on remote machines, and monitoring sensitive data remotely.

Kali Linux, pen-testing, and security forensic Linux distribution also enable us to access Kali machines remotely from any other operating system (Windows, Mac) anywhere in the world. It permits the authorized user to access the Kali system using credentials for security auditing and testing purposes.

This post will illustrate:

How to Set up Kali For Remote Access Using RDP?

To access Kali Linux remotely, first enable the remote access of Kali from the system. Then, access it remotely from any operating system such as Linux or Windows Pro version(Pro edition is necessary).

To access the Kali remote desktop using RDP, go through the following steps.

Step 1: Update Kali

Update the Kali system to the current release using the “apt update” command:

sudo apt update

Step 2: Upgrade Packages

Upgrade Kali’s packages through the “apt upgrade” command. Here, the “-y” option allocates the disk space automatically to the current operation:

sudo apt upgrade -y

Step 3: Install XRDP

Next, install the “xrdp” tool in Kali Linux using the below command. The “XRDP” is a Microsoft tool that enables us to use remote desktops of any OS rather than Windows:

sudo apt install xrdp -y

We have installed the XRPD tool on Kali Linux to access Kali linux desktops from other operating systems:

Step 4: Start Xrdp Service

In the next step, enable the remote access of Kali Desktop by starting the “xrdp” service. To start the service on Kali, run the “service <service-name> start” command. This command requires “sudo” user rights:

sudo service xrdp start

Step 5: Start Session Manager

Next, start the session manager of xrdp on the Kali Linux using the below command. This will manage the user session and start the Xserver:

sudo service xrdp-sesman start

Step 6: Enable xrdp Service on System Start

In order to enable the xrdp service on system boot, run the below command:

sudo update-rc.d xrdp enable

This command will start and enable the xrdp service automatically on system start:

Step 7: Check Status

For confirmation, check the service status and verify if xrdp is running on the system or not:

sudo service xrdp status

Here, the xrdp is successfully activated and running on the Kali Linux:

Step 8: Install Firewall

Start the Firewall on the system to manage the system’s incoming and outgoing traffic. For this purpose, first, install Firewall on Kali:

sudo apt install ufw

Step 9: Enable Firewall

Next, enable the Firewall on the Kali using the “ufw enable” command:

sudo ufw enable

Step 10: Allow “3389” Port

By default, the xrdp server runs on the “3389” port. To remotely access the Kali Desktop through the xrdp X Server, allow the “3389” port for incoming and outgoing traffic rules using the below command:

sudo ufw allow 3389/tcp

Step 11: Reload Firewall

Now, reload the firewall using the given command:

sudo ufw reload

Step 12: Check IP Address

After configuring the Firewall and starting the xrdp service, find out the system IP address for remote access using the “ifconfig” command:

ifconfig

Note the IP address. This will be used for Kali remote access:

Lastly, log out from the Kali User account from the power menu and try to access the Kali remote desktop using the below section.

How to Access Kali Remote Desktop on Windows?

Windows is a universally used OS and is accessible to anyone. Its wide range of functionalities and advanced applications make it a popular choice globally. It also enables us to access any operating system remotely using the Windows pre-installed “Remote Desktop Connection” tool.

For demonstration, follow the below steps.

Step 1: Launch the Windows Remote Connection Tool

First, launch the Window Remote Connection pre-installed tool via the “Startup” menu:

Step 2: Access Kali Remote Desktop

Next, add the IP address of the Kali system in the “Computer” field and press the “Connect” button:

This will start connecting the Windows to Xrdp X-server for Kali’s remote access:

Step 3: Provide Kali User Credentials

Here, the Login to Kali wizard will appear on the screen. Provide the Kali Linux user credentials and press the “OK” button:

This operation may require the Kali user authentication, type in the password, and press the “Authenticate” button:

Here, you can see we have effectively accessed the Kali remote desktop on Windows using the xrdp server:

Note: Sometimes users may face problems in accessing Kali remote desktop from Windows. This is due to Windows may stop remote access by disabling the “Remote Desktop” settings. To resolve such conflicts, open the system settings using “Window + I” key and enable the “Remote Desktop” settings:

How to Access Kali Desktop on Linux Using RDP?

To access the Kali Desktop from any Linux distribution, remote connection packages are available such as Remmina, TigerVNC, AnyDesk and many more. In this section, we will access Kali on Ubuntu distribution using the Remmina remote connection tool.

For proper illustration, follow the below steps.

Step 1: Install Remmina

Install the Remmina from the Ubuntu official resource using the “apt install remmina” command. Here, you can see, by default, the remmina is pre-installed in Ubuntu:

sudo apt install remmina

Step 2: Launch Remmina

Next, launch the Remmina remote connection tool using the “remmina” command:

remmina

Step 3: Access Kali Remote Desktop

Add the IP address of the Kali machine in the below pointed field and press the “Enter” key:

From the Login session, provide the Kali user login credential and press the “OK” button:

For authentication, provide the Kali user password and press the “Authenticate” button:

Here, we have remotely accessed the Kali Linux from Ubuntu:

We have covered the method to access Kali Desktop Using Remote Desktop Protocol.

Conclusion

To access the Kali remote machine from any operating system, first install the xrdp and start its service on Kali Linux. Then, enable the “3389” default port of the xrdp X Server. To access the Kali Linux on Windows, launch the Remote connection tool, add the IP address of the Kali Linux, and connect the Kali remote Desktop. To access Kali on Linux, first install and launch the remmina tool. Then, add the IP address of Kali and access the Kali remote Desktop. This post has elaborated on how to access Kali Desktop using rdp.

About the author

Rafia Zafar

I am graduated in computer science. I am a junior technical author here and passionate about Programming and learning new technologies. I have worked in JAVA, HTML 5, CSS3, Bootstrap, and PHP.