Last active
December 18, 2020 09:25
-
-
Save ruzickap/80ee2292ebf697a0ec05dd4752516464 to your computer and use it in GitHub Desktop.
deploy-public-ssh-key-github.sh
This file contains hidden or 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
GITHUB_USERNAME="${GITHUB_USERNAME:-ruzickap}" | |
DESTINATION_DIRECTORY="${DESTINATION_DIRECTORY:-/root/.ssh}" | |
[[ ! -d "${DESTINATION_DIRECTORY}" ]] && mkdir -v --mode=0700 "${DESTINATION_DIRECTORY}" | |
wget "https://github.com/${GITHUB_USERNAME}.keys" -O "${DESTINATION_DIRECTORY}/authorized_keys" | |
chmod 0600 "${DESTINATION_DIRECTORY}/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment