Skip to content

Instantly share code, notes, and snippets.

@STRRL
Created July 14, 2023 04:44
Show Gist options
  • Save STRRL/84f445d3c6f173b83c165197f21035fa to your computer and use it in GitHub Desktop.
Save STRRL/84f445d3c6f173b83c165197f21035fa to your computer and use it in GitHub Desktop.
append my ssh pub key as ssh authorized_keys
#!/usr/bin/env bash
mkdir -p ~/.ssh
# if authorized_keys not exist, create it
if [ ! -f ~/.ssh/authorized_keys ]; then
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
fi
curl -L http://github.com/strrl.keys >> ~/.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment