Remotely Access Kali Linux system is a useful task that allows you to access the system wherever you go. There are multiple ways to access a system remotely, but the simplest method to access a system is using the Remote Desktop Protocol (RDP). It is one of the secure network connection protocols designed by the Microsoft developers that allows you to access the system remotely and control it from another computer. You can manage your system desktop right from another system, removing the need to purchase a separate mouse or keyboard for the system.
In this guide, you will learn:
- How to Remotely Access Kali Linux Using Remote Desktop Protocol (RDP)
- How to Remotely Access Kali Linux Using RDP on Windows
- How to Remotely Access Kali Linux Using RDP with Microsoft Remote Desktop
- How to Remotely Access Kali Linux Using RDP on Linux
- Bonus Method: How to Remotely Access Kali Linux Using RDP on Virtual Box
- Conclusion
How to Remotely Access Kali Linux Using Remote Desktop Protocol (RDP)
To access Kali Linux remotely using RDP, follow the below-given steps:
Step 1: Install Kali Linux XFCE Desktop and RDP Server
Before you begin setting up Kali Linux remotely, you are required to install XFCE desktop and RDP server (xrdp) on your system. XFCE is optional if you are already using the Kali Linux desktop. However, it is mandatory if you are using the Kali Linux terminal version, because remote desktop connection will only work in desktop mode.
To install XFCE and RDP server on Kali Linux, you can use the following command:
Note: Remove kali-desktop-xfce from the above command to only install RDP server if you are using Kali Linux desktop.
Step 2: Enable RDP Server on Kali Linux
After installing the RDP server, you have to enable it on your system so that it will start automatically whenever you boot the system. You can enable RDP server on Kali Linux from the following command:
Step 3: Install D-Bus Package on Kali Linux
You should also require installing the D-Bus (Desktop Bus) package on your Kali Linux system for a smooth RDP experience with XFCE. This package will allow both RDP and XFCE to connect on your system. You can install D-Bus package from the official Kali Linux repository using the following command:
During the installation of the above package, a prompt window will appear that will ask for your approval to restart some services on your system. You can go with the default one or choose manually and restart them by pressing the Enter button:
Note: The system may restart after completing the installation of the above package.
Step 4: Start RDP Server on Kali Linux
Now at the Kali Linux terminal, start your RDP server by running the below-given command:
Step 5: Check RDP Server Status
To ensure RDP server is running on Kali Linux system, you can run the below-given command:
Step 6: Install Firewall on Kali Linux
It is also recommended to install a Firewall on your Kali Linux system to add extra security to your remote desktop connection. You can install Firewall on Kali Linux from the following command:
Step 7: Allow Communication with the Default RDP Port
By default, RDP server operates at port 3389 and if you have installed Firewall on your Kali Linux system, you can allow communication with this port using the following command:
Step 8: Enable Firewall on Kali Linux
You are required to enable the Firewall service on your system from the following command:
Step 9: Reload Firewall on Kali Linux
Then reload the Firewall on Kali Linux so that the changes are successfully applied, you can do this from the below-given command:
Step 10: Logout of the Current User on Kali Linux
To ensure the connection to the remote desktop is successfully made, you should log out of the current user that you want to access.
How to Remotely Access Kali Linux Using RDP on Windows
For Windows users, there is a built-in application called Remote Desktop Connection that uses the RDP protocol and allows you to access the system. If you have set up the RDP connection on Kali Linux from the above steps, you can use the Remote Desktop Connection using the following steps to access Kali Linux desktop on Windows:
Step 1: First, open Remote Desktop Connection on Windows from the Start Menu:
Step 2: Enter the IP address of your server, and click on the Connect button:
Note: You can find the IP address of your Kali Linux system using the hostname -I command.
Step 3: Allow the connection to remote server using the Yes button:
Step 4: Enter the Kali Linux credentials like username and password by leaving the session as Xorg, then click on the OK button to log in to the system:
Once done, you will be able to see your Kali Linux desktop on Remote Desktop Connection application:
Note: If you are unable to access Kali Linux desktop on Remote Desktop Connection, ensure that it is enabled on your system. You can search for Remote Desktop settings from the Start menu and enable the Remote Desktop connection on Windows:
How to Remotely Access Kali Linux Using RDP with Microsoft Remote Desktop
If you are a Windows or Mac user, you can install Microsoft Remote Desktop from the App Store and Apple Store, respectively and use the following steps to access Kali Linux using RDP:
Note: Here, we are performing steps by installing Microsoft Remote Desktop on Windows, but the same steps can be followed on Mac.
Step 1: Open Microsoft Remote Desktop on Windows or Mac, and click on the Add button:
Step 2: Select the PCs option:
Step 3: Add the IP address of RDP server (Kali Linux), give a connection name according to your choice and click the Save button to add this to the PC list:
Step 4: Now, double-click on the added PC:
Step 5: Click on the Connect anyway button:
This will open the remote desktop login session:
You can use the same credentials you use in the Step 4 of the first method to remotely access Kali Linux desktop on Windows or Mac.
How to Remotely Access Kali Linux Using RDP on Linux
If you are using a Linux system and want to access Kali Linux using RDP, then you have to use the Remmina desktop app. Remmina is a desktop client for Linux systems that uses the RDP and allows you to remotely access the system. You can use the following steps to remotely access Kali Linux using RDP with Remmina on Linux:
Step 1: First, you must install Remmina desktop application on your Linux system from the apt repository using the below-given command:
Step 2: Then run the Remmina desktop application on Linux using the remmina command, enter the IP address of your Linux system, then press Enter:
Step 3: Enter the Kali Linux credentials like username and password:
After this, you will be able to access the Kali Linux system on Linux with Remmina:
Bonus Method: How to Remotely Access Kali Linux Using RDP on Virtual Box
By default, the VirtualBox uses NAT as a networking mode, which means that it provides Kali Linux its own private network adapter and IP address. Thus, accessing the device remotely with that mode is challenging for the users. To overcome this issue, you can change the networking mode to Bridged Adapter to connect your Kali Linux system to a physical network with its own IP address. It will allow you to easily perform remote desktop activities. You can switch from NAT to Bridged Adapter on VirtualBox using the following steps:
Step 1: First, right-click on the Kali Linux Virtual Machine and click on the Settings:
Step 2: Then navigate to Network section, change the network mode to Bridged Adapter from NAT and click on the OK button to make the changes:
Step 3: Check for the IP address using the hostname -I command, if it is changed to 192.168…, you have completed the process. Else, you have to reboot the Virtual Machine to apply the changes.
Conclusion
RDP is a secure network communication protocol used to remotely access and control a desktop system. You can easily access your Kali Linux system remotely by installing XFCE and RDP server (xrdp) from the default system repository. Then enable the RDP server, install Firewall and allow the traffic to the default RDP port 3389 on Kali Linux. You have to reload the Firewall and start the RDP server to make changes to the system. Then you can use Remote Desktop Connection on Windows to access the Kali Linux system using the IP address, username and password. You can also install Microsoft Remote Desktop app to access the system on Windows or Mac. Linux users can install and use Remmina to access the Kali Linux system using RDP.
By day, I am an engineer and researcher, building bridges and figuring out how the universe works. But when the clock strikes five, I turn into a wordsmith!
I write about my adventures on my blog, sharing tips and tricks to help others join the tech fun. I have worked on Raspberry Pi, Ubuntu, Debian, and Laptops. Right now, I have accepted the challenge of working on the Kali Linux system, and with my vast expertise in Linux systems, I will help users overcome the challenges through my blogs.