forked from gwagner/packer-centos
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regenerating root key and removing public key before creating the AMI
- Loading branch information
Kenny Gryp
committed
Sep 8, 2015
1 parent
c8c2d59
commit 8fefaf1
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
#---------------------------------------------- | ||
# amazon AMI instance is built from | ||
# http://www.nixknight.com/2014/04/build-ebs-backed-centos-ec2-ami-from-scratch/ | ||
# | ||
# we want rc.local to reexecute everything | ||
echo "Cleanup -- making sure password gets regenerated" | ||
touch /root/firstrun | ||
echo "Cleanup -- removing authorized_keys for root" | ||
rm -rf /root/.ssh/authorized_keys |