Skip to content

Instantly share code, notes, and snippets.

@ramarnat
Created February 27, 2011 22:36
Show Gist options
  • Select an option

  • Save ramarnat/846639 to your computer and use it in GitHub Desktop.

Select an option

Save ramarnat/846639 to your computer and use it in GitHub Desktop.
#!/bin/sh -e
# Root SSH Public Key
mkdir -p /root/.ssh >/dev/null 2>&1
wget -q -O - http://169.254.169.254/2008-02-01/meta-data/public-keys/0/openssh-key\
>/root/.ssh/authorized_keys
chmod -R go-rwsx /root
# Userdata Shell Script
wget -q -O - http://169.254.169.254/2008-02-01/user-data| sh
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment