Created
April 17, 2017 22:34
-
-
Save pallih/799e851190d6727d5d7680484afb4513 to your computer and use it in GitHub Desktop.
User data script for EC2 on AWS to install hashcat and Nvidia drivers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ubuntu 14.04 server - 10 Gb storage at least | |
# update system | |
apt-get update | |
apt-get install build-essential -y | |
apt-get install git -y | |
# clone hashcat and make | |
cd /home/ubuntu | |
git clone https://github.com/hashcat/hashcat.git | |
cd /home/ubuntu/hashcat | |
git submodule update --init | |
make | |
# fetch ubuntu driver and install | |
mkdir /home/ubuntu/cuda | |
cd /home/ubuntu/cuda | |
apt-get install linux-headers-$(uname -r) | |
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1404-8-0-local-ga2_8.0.61-1_amd64-deb | |
dpkg -i cuda-repo-ubuntu1404-8-0-local-ga2_8.0.61-1_amd64-deb | |
apt-get update | |
apt-get install cuda -y | |
# clean up | |
echo 'export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}' >>~/home/ubuntu/.profile | |
chown -R ubuntu:ubuntu /home/ubuntu/cuda | |
chown -R ubuntu:ubuntu /home/ubuntu/hashcat | |
touch /home/ubuntu/done.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment