Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…imal Centos installs are missing
  • Loading branch information...
commit c8b3500a22024e3307ae00f0eed602f510cc4b59 1 parent 3a88ea6
JulesAU authored

Showing 1 changed file with 8 additions and 1 deletion. Show diff stats Hide diff stats

  1. 9  bootstrap.sh
9  bootstrap.sh
@@ -3,8 +3,15 @@
3 3
 # Use it like this:
4 4
 # curl https://raw.github.com/JulesAU/chef-bootstrap/master/bootstrap.sh | sudo bash
5 5
 
  6
+echo "Enter a URL from which we can fetch the authorized public SSH keys:"
  7
+read sshKeyUrl
  8
+
6 9
 test -f ~ec2-user/.ssh/authorized_keys && cat ~ec2-user/.ssh/authorized_keys  > /root/.ssh/authorized_keys && rm -f ~ec2-user/.ssh/authorized_keys
7 10
 
  11
+mkdir -p /root/.ssh
  12
+curl -s -L $sshKeyUrl > /root/.ssh/authorized_keys
  13
+chmod -R 700 /root/.ssh
  14
+
8 15
 echo 'Protocol 2
9 16
 SyslogFacility AUTHPRIV
10 17
 PermitRootLogin yes
@@ -26,7 +33,7 @@ Subsystem sftp /usr/libexec/openssh/sftp-server
26 33
 service sshd reload
27 34
 update-motd  --disable
28 35
 
29  
-yum install -y ruby ruby-devel ruby-ri ruby-rdoc ruby-shadow gcc gcc-c++ automake autoconf make curl dmidecode
  36
+yum install -y ruby ruby-devel ruby-ri ruby-rdoc ruby-shadow gcc gcc-c++ automake autoconf make curl dmidecode authconfig policycoreutils
30 37
 
31 38
 cd /tmp
32 39
 export VER=1.8.21

0 notes on commit c8b3500

Please sign in to comment.
Something went wrong with that request. Please try again.