Created
August 8, 2017 02:06
-
-
Save ymkjp/6e60c5b207f8600926541b3e9d83728f to your computer and use it in GitHub Desktop.
Add pkey to auth agent
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 | |
# Load this script from bashrc | |
SESSIONS=( | |
uname_rsa | |
uname-us-east-1.pem | |
) | |
for SESSION in "${SESSIONS[@]}"; do | |
[[ $(ssh-add -l | grep "${SESSION}") ]] || ssh-add "${HOME}/.ssh/${SESSION}"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment