Skip to content

Instantly share code, notes, and snippets.

@dwallraff
Created March 29, 2016 21:25
Show Gist options
  • Save dwallraff/b77c174560ea295adf0d981b50a2af1c to your computer and use it in GitHub Desktop.
Save dwallraff/b77c174560ea295adf0d981b50a2af1c to your computer and use it in GitHub Desktop.
Clean an AMI before publishing
find /root/.*history /home/*/.*history -exec rm -f {} \;
find / -name "authorized_keys" –exec rm –f {} \;
find /root/ /home/*/ -name .cvspass –exec rm –f {} \;
find /root/.subversion/auth/svn.simple/ /home/*/.subversion/auth/svn.simple/ -exec rm –rf {} \;
rm /etc/syslog.conf
service rsyslog restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment