Skip to content

Instantly share code, notes, and snippets.

@acodeninja
Created September 17, 2021 11:43
Show Gist options
  • Save acodeninja/f0855021079adfa6ad424baa09de6d1b to your computer and use it in GitHub Desktop.
Save acodeninja/f0855021079adfa6ad424baa09de6d1b to your computer and use it in GitHub Desktop.
Install github ssh keys on a remote box
#!/usr/bin/env bash
GH_USER=$1
sudo apt-get instal jq -y
curl "https://api.github.com/users/$GH_USER/keys" | jq '.[].key' -r > ~/.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment