How to RDP into Kali Linux

I love to experiment with various software and one of those essential system that I play around is kali. I’ve setup mine in ESXI server that I cannot directly connect. This is one of the way you can RDP into your kali and experience full GUI access.

Here is the codes that you need to run in sudo mode.

Apt-get update && apt-get upgrade
Apt-get dist-upgrade
Apt-get install xrdp
Service xrdp-sesman start
update-rc.d xrdp enable
Apt-get remove gnome-core
apt-get install lxde-core lxde kali-defaults kali-root-login desktop-base
update-alternatives –config x-session-manager

Now you can access your kali instance from your Windows PC.

Setup Direct RDP to Windows PC with non standard port.

Recently I had situation that I had to setup direct RDP access to PC behind firewall. I know some of you think why you did that but the issue was application user was using wasn’t displaying properly any other remote software. Yes, I did all of those remote software and none work. But you know you cannot use usual 3389 RDP port it is known security issue.

So here is how setup non standard port for RDP access.

First go to System properties and enable RDP access

After that go to run in start menu and type regedit.exe this will bring up registry editor and navigate to

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber

When you open port number switch the base to decimal and enter port that you are prefer. I mean of course valid port.


Now you have to go to control panel and firewall and allow inbound and outbound for port that you need. I don’t know how many time I forgot to do this step and tried to rdp and got rejected 🙂

Click on advance and create inbound and out bound rule for the port that you created.

Make sure to restart the PC.

Of course if you are doing RDP from outside you will need DNAT rule or port forward rule on firewall. This is a topic for another blog I guess!