Kali Linux is a Linux distribution based on Debian that is developed for digital forensics and penetration testing. Kali Linux is a highly flexible and efficient operating system based on the Linux kernel and several other major open-source software packages.
It’s a strong penetration testing platform that’s also perfect for security auditing, reverse engineering, and other security-related activities.
Today we are going to install Kali Linux on the Oracle Cloud platform and set up an RDP connection. You can use this server on a graphic user interface without an SSH connection. I use Oracle Cloud free tier AMD VM instance for this tutorial. At The end of this tutorial, you can get a 24/7 Kali Linux machine for your cyber security learning.
Create a Kali Linux (VPS) Virtual Machine
First, you have to sign up for Oracle Cloud Free Tier. It is a very easy task, so I am not going to show it. Click the link for the registration. After you register on the Oracle cloud, login into the dashboard.
In the dashboard, click the “Create a VM instance” button to start setting up your server. In this window, you will be able to customize the server as you wish. You can change the instance name using any name.
Under “Image and shapes” click the little “Edit” link at the corner. Then click the “Change Image” button to select an OS. In the list, you can see platform images you can use for this server. We want the Kali Linux OS instead of these OS.
So, click on “Image source” in the drop-down menu select “Oracle Images”. Here you can see Kali Linux as an image. Select it as your OS and you have to accept Oracle standard terms and restrictions.

For networking, you can select an existing virtual network or create a new one. You can also change the name of your networks and subnets. Download SSH private key, it may be useful later. You can specify the boot volume for this instance here. By default it is around 100GB, so I go with the default volume.
After finishing all the customization, click the “Create” button to deploy the server. Wait until the instance is running.
Prepare for Console Connection without SSH
By default, the Kali Linux instance is not accessible using an SSH connection. So you have to make a console connection to this VPS. Under “resources”, click the “Console connection” then launch the cloud shell connection. You can see cloud shell connection is set up, wait until it finishes. The default username and password is “debian”.
Default username/password for login;
- Username: debian
- Password: debian

Install Kali RDP Connection – xfce GUI
Now you have successfully installed the Kali Linux on Oracle cloud virtual machine. Let’s set up a remote desktop connection to this server. Before installing the RDP, we can add virtual memory to this system.
For that, get root access by typing this command.
sudo -i
Check the availability of memory, typing this. There is no swap space.
free -m
To add the new swap file paste the following command. This takes some time, wait until you get new lines on the terminal. Don’t try to re-enter it. You will get this output when it is finished.
If you want you can use any size of swap file. This command adds 5024GB swap space to the server. You can simply change the bs=5024 in the command for your customized swap sizes.
sudo dd if=/dev/zero of=/mnt/swap.0 bs=5024 count=1048576 && sudo mkswap /mnt/swap.0 && echo "/mnt/swap.0 swap swap defaults 0 0" >> /etc/fstab && swapon /mnt/swap.0 && sudo swapon -s
Recheck the available memory of the server. You can see the swap file added to the system.
free -m
Now we can proceed to RDP installation. I have cleared the terminal why this is empty, so don’t get confused. Enter this command to start the installation process.
wget https://gitlab.com/kalilinux/build-scripts/kali-wsl-chroot/-/raw/master/xfce4.sh && chmod +x xfce4.sh && sudo ./xfce4.sh
This installation takes a long time to finish. Don’t close the terminal. You will encounter some windows with choices. For all of those, you can proceed with default selections. I am going to skip the process.
At the end of the installation, you will get this screen. Now you can enable the XRDP with this command.
sudo systemctl enable xrdp --now
To run the XRDP, use this command. Here you have finished installing RDP and the Kali desktop environment.
sudo /etc/init.d/xrdp start
Add Firewall Rules & Connect to the RDP
You can minimize or close the console. Right-click on the subnet name and open it on a new window. Click on the security list name to enter the firewall rule section. You have to enable the RDP port to connect to this server.
For that click the “Add ingress rules” button. On the IP protocol dropdown menu, select “RDP” and save the configuration.
Let’s connect to the server. Open the “Remote desktop connection” app and enter the following details. First, enter your machine’s public IP address and click “Connect”. Type “debian” for both password and the username. This is your Kali Linux desktop with all tools and apps.

Use this server only for educational purposes. Hacking is illegal if you are doing it without permission from the owner of the computer or computer network. Hacking without permission can attract criminal charges and a jail term if found guilty. So remember it.
If you have any issue regarding this tutorial, open question directly on MineX Tuts Community Forum.
Check Premium VPS Providers and Discounts
You can also install Kali Linux on these premium VPS.
FAQ – Install Kali Linux on Cloud
Is it legal to install Kali Linux?
Yes, The Kali Linux operating system is used to learn how to hack and to practice penetration testing. It is legal to install any operating system, not just Kali Linux.
How install Kali Linux on your home PC?
You can simply download the image from Kali Linux official site Here (Kali Linux Download) and install it as any-other OS.
i am getting blank screen while RDP into the system
You build script link 404’s chap
Thanks for the useful tutorial.
I cannot connect to RDP after restarting the system, please help?
Working perfectly well done 🙂
[…] Installing Kali Linux for Virtual Machine & xfce Kali RDP […]