Permalink
Browse files

Added auto-install of SSH keys, added chef dependencies that some min…

…imal Centos installs are missing
  • Loading branch information...
1 parent 3a88ea6 commit c8b3500a22024e3307ae00f0eed602f510cc4b59 @JulesAU committed Apr 20, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 bootstrap.sh
View
@@ -3,8 +3,15 @@
# Use it like this:
# curl https://raw.github.com/JulesAU/chef-bootstrap/master/bootstrap.sh | sudo bash
+echo "Enter a URL from which we can fetch the authorized public SSH keys:"
+read sshKeyUrl
+
test -f ~ec2-user/.ssh/authorized_keys && cat ~ec2-user/.ssh/authorized_keys > /root/.ssh/authorized_keys && rm -f ~ec2-user/.ssh/authorized_keys
+mkdir -p /root/.ssh
+curl -s -L $sshKeyUrl > /root/.ssh/authorized_keys
+chmod -R 700 /root/.ssh
+
echo 'Protocol 2
SyslogFacility AUTHPRIV
PermitRootLogin yes
@@ -26,7 +33,7 @@ Subsystem sftp /usr/libexec/openssh/sftp-server
service sshd reload
update-motd --disable
-yum install -y ruby ruby-devel ruby-ri ruby-rdoc ruby-shadow gcc gcc-c++ automake autoconf make curl dmidecode
+yum install -y ruby ruby-devel ruby-ri ruby-rdoc ruby-shadow gcc gcc-c++ automake autoconf make curl dmidecode authconfig policycoreutils
cd /tmp
export VER=1.8.21

0 comments on commit c8b3500

Please sign in to comment.