Skip to content

Instantly share code, notes, and snippets.

@khanhicetea
Created November 20, 2016 15:41
Show Gist options
  • Save khanhicetea/f60bdcdbd820c97dbc0857bc54c14470 to your computer and use it in GitHub Desktop.
Save khanhicetea/f60bdcdbd820c97dbc0857bc54c14470 to your computer and use it in GitHub Desktop.
Ubuntu 16.04 bootstrap script
#!/bin/sh
sudo sed -i "s/IPV6=yes/IPV6=no/" /etc/default/ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp
sudo ufw --force enable
sudo ufw reload
sudo sed -i "s/.*PasswordAuthentication .*/PasswordAuthentication no/" /etc/ssh/sshd_config
sudo service ssh restart
sudo apt update
sudo apt upgrade -y
sudo apt install git vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment