Last active
December 16, 2015 08:48
-
-
Save sbirch/5408223 to your computer and use it in GitHub Desktop.
Quickstart on an Ubuntu image
This file contains hidden or 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
| echo "Making README..." | |
| touch README | |
| wget http://ipecho.net/plain -qO - >> README | |
| echo -e "\n" >> README | |
| echo "Updating packages..." | |
| apt-get update | |
| apt-get upgrade | |
| echo "Installing default packages..." | |
| sudo apt-get install htop | |
| #Not very useful w/ EC2 | |
| #echo "Enabling ufw, only port 22/SSH" | |
| #echo "Firewall managed with ufw, currently port 22 open" >> README | |
| #echo "(Don't forget to manage upstream firewalls with your provider)" >> README | |
| #ufw allow 22 | |
| #ufw enable | |
| echo "Disabling password login..." | |
| sudo echo "PermitRootLogin no" >> /etc/ssh/sshd_config | |
| sudo echo "PasswordAuthentication no" >> /etc/ssh/sshd_config | |
| service ssh restart | |
| #http://plusbryan.com/my-first-5-minutes-on-a-server-or-essential-security-for-linux-servers | |
| #Add logwatch & auto security updates? | |
| echo -e '\a\a\a' |
This file contains hidden or 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
| cat /etc/hostname | |
| uptime | |
| echo -e "\nNETWORK:" | |
| sudo netstat -tulpn | |
| echo -e "\nFILESYSTEM:" | |
| df -h | |
| echo -e "\nMEMORY (MB):" | |
| free -tm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment