Skip to content

Instantly share code, notes, and snippets.

@RichardBronosky
Created January 25, 2019 16:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save RichardBronosky/bda0af7c5feca2459ef2e6b3d103341e to your computer and use it in GitHub Desktop.
Save RichardBronosky/bda0af7c5feca2459ef2e6b3d103341e to your computer and use it in GitHub Desktop.
Get ssh keys for Raspberry Pi from GitHub
sudo bash <<EOF
local_user=pi
github_user=RichardBronosky
umask 077
mkdir -p ~$local_user/.ssh
curl -sSL https://github.com/${github_user}.keys >> ~$local_user/.ssh/authorized_keys
chown -R $(id -u $local_user):$(id -g $local_user) ~$local_user/.ssh
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment