Created
September 17, 2021 11:43
-
-
Save acodeninja/f0855021079adfa6ad424baa09de6d1b to your computer and use it in GitHub Desktop.
Install github ssh keys on a remote box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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