how to enable rdp on kali linux

Getting Started With RDP On Kali Linux (Remote access)

There are several ways to remotely access a computer running Kali Linux from another device. While VNC is a popular choice, RDP stands out as an alternative I really appreciate. In this article, I will introduce XRDP and demonstrate how you can quickly start using it on Kali Linux.

RDP, or Remote Desktop Protocol, allows access to the full desktop environment from another computer. The RDP server (xrdp) can be installed on Kali Linux using APT. On the client side, most systems already have an RDP app pre-installed.

I’ll start with a brief overview of the Remote Desktop Protocol (RDP) for those unfamiliar with it, followed by a guide to installing the RDP server on Kali. Finally, I’ll explain how to connect to it from any computer.

Master Linux Commands
Your essential Linux handbook
Want to level up your Linux skills? Here is the perfect solution to become efficient on Linux. 20% off today!

Download now

Introducing RDP

Let’s start with a bit of theory before going into the installation steps. Already familiar with this protocol? Feel free to skip this part.

What is RDP?

RDP, developed by Microsoft, is a protocol designed to allow users to access a computer’s graphical interface remotely. It stands for “Remote Desktop Protocol” and was initially known as “Terminal Server.”

Its usage was widespread in large companies when I started my career in system administration. Often, there was a central server hosting all the applications, and users connected to it using thin clients — basic, low-power devices meant solely for accessing the server via RDP.

Become a Cyber Security Expert!:
Enroll in the Complete Cyber Security Course now, and master online safety.
Learn to defeat hackers, protect privacy, and stay anonymous with over 50 hours of on-demand video.

This setup meant no local files for users; everything was stored on the server. This approach potentially saved time for administrators and, despite Microsoft’s significant licensing fees, possibly money for the companies.

As a system administrator, I also used RDP daily to manage servers. But given its Microsoft origins, how does RDP fit into the world of Kali Linux?

What is XRDP?

XRDP is the Linux-friendly, free, and open-source counterpart to Microsoft’s RDP protocol. It’s compatible with most Linux distributions and comes without any licensing fees.

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!

In this guide, we’ll be using XRDP. It’s included in the default repository on Kali Linux.

XRDP functions just like RDP. You can use the same clients for it, meaning if you’re on a Windows computer, you already have the client installed, and it works the same as it would with a Windows server.

How to install XRDP on Kali Linux

Enabling access to a Kali Linux computer via RDP is pretty straightforward, here are the main steps:

  • Use APT to install the RDP server on Kali Linux (xrdp)
  • Find the IP address of the server
  • Use it to access the system remotely

Don’t worry, I’ll explain each step in details now

Installing the XRDP package

As mentioned earlier, XRDP is available in the package manager on Kali Linux, so you can install it with APT:

  • Open a terminal (or access your system via SSH).
  • Make sure APT is up-to-date with:
    sudo apt update
  • Install the XRDP package with:
    sudo apt install xrdp

    Press “Y” and “Enter” to confirm the installation.

Start the XRDP service

While I was testing this, I noticed that the service wasn’t set to start automatically. You might need to start it manually with:
sudo systemctl start xrdp

And enable it to make it start automatically on boot:
sudo systemctl enable xrdp

You can also use the “status” command, to make sure the service is running:
sudo systemctl status xrdp

Find the server IP address

Now that XRDP is installed and the service is running, all we need to do is get the IP address of the system to access it remotely.

Since you have a desktop environment installed, the easiest way is to right-click on the network icon (top-right corner) and select “Connection Information”. This will open a window that looks like this; with the network information:

Another option is to use the following command line:
ip a
And find the IP address for your main connection (likely eth0 or wlan0).

Either way, you’re now ready to try RDP from your computer to access Kali Linux remotely.

How to use RDP from your computer

For most users, an RDP client is readily accessible or easy to install on their computers, and it varies based on the operating system.

Windows users have the advantage of a built-in RDP client. Linux’s users can opt for Remmina, a popular choice for RDP. Meanwhile, Mac users can find Microsoft’s RDP client available in the App Store.

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!

Let’s do a quick overview for each system.

Use RDP from a Windows computer

On Windows, the process is straightforward as the Remote Desktop Connection app comes pre-installed, regardless of the Windows version you’re using.

Simply search for “rdp” in the start menu. In older versions of Windows, you might find it in the “Accessories” subfolder.

Master Ethical Hacking Skills!
Join the Complete Ethical Hacking Course Bundle and step into the world of cybersecurity.
Learn to think like a hacker and protect systems with this comprehensive course.

When you start the app, you’ll be prompted to enter the remote computer IP address. That’s where you put the Kali Linux IP we just got in the previous step. Click on “Connect”, and you should get a login prompt to access the desktop interface:

Important: You can’t be logged in on the same account simultaneously. If your session is already opened on Kali, you must log out first, or use a different account.

Once logged in via RDP, you should get access to the full interface, as if you were on the remote computer directly:

Connecting from a Linux computer

On Linux, the choice of RDP client depends on the distribution you’re using. One tool I recommend is “Remmina.” It’s compatible with XRDP and also supports VNC and other protocols, making it an all-in-one application for various remote desktop needs.

I think it’s pre-installed on Ubuntu and many other distributions, but if it’s not the case, you can easily add it with your package manager. For example, on Debian systems:
sudo apt install remmina

Once installed, it’s the same idea as on Windows. Just type the Raspberry Pi IP address and log in.

Accessing RDP server from macOS

I didn’t test this one as I don’t have a Mac, but you can find RDP clients in the app store. As the Microsoft client is one of them, and it’s free, I would try this one first.

Once installed, follow the same procedure as on Windows.

Whenever you’re ready for more security, here are things you should think about:

- Break free from Gmail: You should be able to choose what happens to your data. With Proton, only you can read your emails. Get private email.

- Protect yourself online: Use a high-speed Swiss VPN that safeguards your privacy. Open-source, no activity logs. Get Proton VPN risk-free.

- Master Linux commands: A sure method to learn (and remember) Linux commands. Useful ones only, one at a time, with clear explanations. Download the e-book.

Similar Posts