Skip to content

Instantly share code, notes, and snippets.

@zenwalk
Forked from STRRL/append-ssh-authorized_keys.sh
Created November 24, 2023 09:06
Show Gist options
  • Save zenwalk/feeccee3f7c135b533438a10328ab86e to your computer and use it in GitHub Desktop.
Save zenwalk/feeccee3f7c135b533438a10328ab86e 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