Last active
November 28, 2018 05:00
-
-
Save gubatron/e2a3841f37342a0f837aae6f16a6ecda to your computer and use it in GitHub Desktop.
quick and dirty startSSHAgent bash function
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
function startSSHAgent { | |
if [[ -z "$SSH_AGENT_PID" ]]; then | |
echo "Starting fresh ssh agent" | |
else | |
kill $SSH_AGENT_PID | |
fi | |
eval `ssh-agent` | |
ssh-add ~/.ssh/my_private_key | |
ssh-add ~/.ssh/my_private_key_2 | |
... | |
ssh-add ~/.ssh/my_private_key_n | |
} | |
startSSHAgent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment