26
Deploy Kali Linux with GUI on the cloud
I recently helped organise a cyber security workshop for youngsters between 13 and 16. Some participants could not run virtual machines for various reasons.
Since the workshop required participants to have access to Kali Linux, I deployed Kali Linux with a Graphical User Interface (GUI) on Google Cloud Platform (GCP) for the participants. In this post, I'm going to show you how I did it.
P.S. Although I used GCP, these steps are applicable to other platforms e.g. DigitalOcean.
Since Kali Linux will be running with a GUI, I recommend allocating slightly more hardware resources.
Hardware | Specifications |
---|---|
Processor | 2 cores |
Memory | 4 GB |
Storage | 40 GB |
I recommend selecting Debian 10 as the operating system, since Kali Linux is built on top of Debian. Once it's running, connect via SSH.
First, update and upgrade.
$ sudo apt update && apt upgrade
Add the "kali-rolling" repository to your sources.
$ echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list
Download the repository's key for the system to verify Kali Linux packages and add it with apt-key
.
$ curl https://archive.kali.org/archive-key.asc | sudo apt-key add
Update again. The new "kali-rolling" repository should be recognised.
$ sudo apt update
The "kali-linux-default" package contains all the tools in a standard Kali Linux distribution.
$ sudo apt install kali-linux-default
Once done, you need to install a desktop environment. The preferred desktop environment for Kali Linux is Xfce.
$ sudo apt install kali-desktop-xfce
Finally, you need to install Xrdp. This will allow you to access and interact with the GUI via Remote Desktop Protocol (RDP).
$ sudo apt install xrdp
⚠️ Note
Make sure you have set a password for your user account.$ sudo passwd myuser # replace myuser with your account name
If you're on Windows, use Remote Desktop Connection. If you're on Mac, download Microsoft Remote Desktop (available on the App Store).
It is normal to see a black screen initially. Wait for a few moments and the desktop should appear. If it is taking particularly long, consider changing the hosting region nearer to you.
If you encounter a "login failed for display 0", make sure you have set a password for your user account.
26