Go back

Install Kali Linux on AWS EC2

This section describes how to launch and connect to Kali GUI Linux in Amazon Web Services (AWS).

  1. Open Kali GUI Linux VM listing on AWS marketplace

/img/aws/desktop-linux-kali/marketplace.png

  1. Click on Continue to subscribe.
  • Login with your credentials and follow the instruction.
  • Subscribe to the product and click on Continue to configuration button.
  • Select a Region where you want to launch the VM(such as US East (N.Virginia))

/img/aws/desktop-linux-kali/region.png

  • Click on Continue to Launch Button.
  • Choose Action: You can launch it through EC2 or from Website.(Let’s choose Launch from website)

/img/aws/desktop-linux-kali/launch.png

  • Optionally change the EC2 instance type. (This defaults to t2.medium instance type, 2 vCPUs and 4 GB RAM)
  • Optionally change the network name and subnetwork names.

/img/aws/desktop-linux-kali/vpc.png

  • Select the Security Group. Be sure that whichever Security Group you specify have ports 22 (for ssh) and 5900 (for VNC) exposed.
  • Be sure to download the key-pair which is available by default, or you can create the new key-pair and download it.

/img/aws/desktop-linux-kali/SG.png

  • Click on Launch..
  • Kali GUI Linux will begin deploying.
  1. A summary page displays.To see this instance on EC2 Console click on EC2 Console link.

/img/aws/desktop-linux-kali/deployed.png

  1. On the EC2 Console page, instance is up and running. To connect to this instance through putty, copy the IPv4 Public IP Address

/img/aws/desktop-linux-kali/public-ip.png

  1. Open putty, paste the IP address and browse your private key you downloaded while deploying the VM, by going to **SSH- >Auth **, click on Open.

/img/aws/ethereum-fullnode/putty-01.png

/img/aws/ethereum-fullnode/putty-02.png

  1. login as ubuntu.

/img/aws/desktop-linux-kali/ssh-login.png

  • run below command to connect to kali terminal from ssh command prompt.
  sudo docker exec -it kali-linux /bin/bash

/img/aws/desktop-linux-kali/kali-terminal.png

  • If above command returns “Error response from daemon:” error or if you see docker command not found error as shown below then wait for few minutes and run below commands to start the kali container and VNC and then run above command again.

/img/azure/desktop-linux-kali/docker-not-found.png

sudo docker start kali-linux
sudo docker exec kali-linux /entrypoint.sh &

/img/azure/desktop-linux-kali/start-kali-linux.png

/img/gcp/desktop-linux-kali/start-vnc.png

  1. You can connect to the VM’s desktop environment from any local windows machine using VNC protocol or local linux machine using Remmina.
  2. To connect using VNC Client via Windows Machine, first note the public IP address of the VM.
    Then From your local windows machine, goto “start” menu, in the search box type and select “VNC”.

Note: : If you don’t have VNC installed on your Windows machine, first Install VNC Viewer as per your device.

  1. In the “VNC Viewer” wizard, copy the external ip and click connect.Accept the encryption warning.

/img/gcp/desktop-linux-kali/kali-vnc-login.png

  1. Now you are connected to out of box Kali GUI Linux environment via Windows Machine with root user.

/img/gcp/desktop-linux-kali/kali-rdp-desktop.png

  1. To connect using Remmina via Linux machine, first note the external IP of the VM from VM details page,then from your local Linux machine, goto menu, in the search box type and select “Remmina”.

Note: : If you don’t have Remmina installed on your Linux machine, first Install Remmina as per your linux distribution.

/img/gcp/common/remmina-search.png

  1. In the “Remmina Remote Desktop Client” wizard, select the VNC option from dropdown and paste the external ip and click enter

/img/gcp/desktop-linux-kali/remmina-login.png

  1. Now you are connected to out of box Kali GUI Linux environment via Linux Machine.

/img/gcp/desktop-linux-kali/kali-rdp-desktop.png

  1. After your first login, Open terminal and run below command to change the root user password.
x11vnc -storepasswd

/img/gcp/desktop-linux-kali/root-passwd.png

  1. Once the passwd is set, reboot the vm and re-login with root user and new password. - /img/gcp/blackarch-linux/vnc-password-prompt.png

  2. Now your are connected to out of box Kali GUI Linux environment which comes with preinstalled kali tools. /img/gcp/desktop-linux-kali/kali-applications.png

Go back