How to install Kali Linux on Google Cloud
On this post, I am going to guide you how to install & upload your Kali Linux into Google cloud platform.
Requirement
- Google Cloud account number
- Google Cloud SDK
- VirtualBox
- Kali Linux ISO (or VirtualBox images)
Let’s start!
Create a VirtualBox virtual machine
It’s easy to create a Kali Linux Virtualbox virtual machine so in this post, I will use Kali VirtualBox image that I downloaded from Kali Linux download page.
Configure kali sshd service
Extract and import Kali Virtual Image. Turn on the Kali Linux virtual machine to install and configure openssh-server.
Install openssh-server
apt-get install openssh-server
Change the configuration file
vim /etc/ssh/sshd_config
Change #PermitRootLogin prohibit-password to PermitRootLogin yes
Set ssh run on the boot
update-rc.d –f ssh enable 2 3 4 5
Turn off the Kali Linux virtual machine.
Create a raw file
Convert qcow to raw file.
vboxmanage clonehd –format raw kali.qcow disk.raw
Convert into tar format
tar –zcvf ~/kali.tar.gz disk.raw
Upload image to Google Cloud
Create bucket
https://cloud.google.com/storage/docs/quickstart-gsutilgsutil mb gs://bucket-name/
Upload to bucket
gsutil cp kali.tar.gz gs://bucket-name/kali.tar.gz
Start Kali Linux virtual machine
gcloud compute images create kali –source-uri gs://bucket-name/kali.tar.gz
gcloud compute instances create kali –image kali –machine-type n1-standard-1 –zone us-central1-b