Jump to content

How to Access Kali Desktop Using Remote Desktop Protocol


Linux Hint

Recommended Posts

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

word-image-413450-1.png

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

word-image-413450-2.png

word-image-413450-3.png

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

word-image-413450-4.png

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

word-image-413450-5.png

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

word-image-413450-6.png

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

word-image-413450-7.png

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:

word-image-413450-8.png

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:

word-image-413450-9.png

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

word-image-413450-10.png

word-image-413450-11.png

Step 9: Enable Firewall

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

sudo ufw enable

word-image-413450-12.png

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

word-image-413450-13.png

Step 11: Reload Firewall

Now, reload the firewall using the given command:

sudo ufw reload

word-image-413450-14.png

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:

word-image-413450-16.png

Step 2: Access Kali Remote Desktop

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

word-image-413450-17.png

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

word-image-413450-18.png

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:

word-image-413450-19.png

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

word-image-413450-20.png

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

word-image-413450-21.png

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:

word-image-413450-22.png

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

word-image-413450-23.png

Step 2: Launch Remmina

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

remmina

word-image-413450-24.png

Step 3: Access Kali Remote Desktop

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

word-image-413450-25.png

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

word-image-413450-26.png

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

word-image-413450-27.png

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

word-image-413450-28.png

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.

View the full article

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...