Skip to content

Instantly share code, notes, and snippets.

@chrisdlangton
Last active December 13, 2023 09:13
Show Gist options
  • Save chrisdlangton/1e3ae407da5484bf3393937914935e4d to your computer and use it in GitHub Desktop.
Save chrisdlangton/1e3ae407da5484bf3393937914935e4d to your computer and use it in GitHub Desktop.
run ubuntu with kali on ec2
#!/bin/bash -ex
sudo su -
apt-get update
apt-get install -y build-essential git jq curl wget gnupg
wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add -
sh -c "echo 'deb https://http.kali.org/kali kali-rolling main non-free contrib' > /etc/apt/sources.list.d/kali.list"
sh -c "echo 'Package: *' > /etc/apt/preferences.d/kali.pref
echo 'Pin: release a=kali-rolling' >> /etc/apt/preferences.d/kali.pref
echo 'Pin-Priority: 50' >> /etc/apt/preferences.d/kali.pref"
wget http://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2022.1_all.deb
dpkg -i kali-archive-keyring_2022.1_all.deb
rm kali-archive-keyring_2022.1_all.deb
apt-get update
apt-get update --fix-missing
apt-get install -f
apt-get--fix-broken install
apt-get install -y ubuntu-desktop tightvncserver gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
apt-get upgrade
# https://ubuntu.com/tutorials/ubuntu-desktop-aws#3-configuring-the-vnc-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment