Skip to content

Instantly share code, notes, and snippets.

@crohr
Last active November 30, 2023 13:39
Show Gist options
  • Save crohr/5264ad4099e77bb1567481e6a4e6d5ce to your computer and use it in GitHub Desktop.
Save crohr/5264ad4099e77bb1567481e6a4e6d5ce to your computer and use it in GitHub Desktop.
ec2-user-data.sh
#!/bin/bash
set -e
set -o pipefail
KEYS="${KEYS:=crohr}"
mkdir -p /root/.ssh
chmod 0700 /root/.ssh
curl -L https://github.com/{$KEYS}.keys > /root/.ssh/authorized_keys
chmod 0600 /root/.ssh/authorized_keys
curl -sSL https://get.docker.com | bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment