Created
September 10, 2015 03:56
-
-
Save srkiNZ84/e391b73491e0694f124e to your computer and use it in GitHub Desktop.
Add SSH key to agent on bash startup
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
SSHAGENT=/usr/bin/ssh-agent | |
SSHAGENTARGS="-s" | |
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then | |
eval `$SSHAGENT $SSHAGENTARGS` | |
trap "kill $SSH_AGENT_PID" 0 | |
fi | |
/usr/bin/ssh-add ~/some_private_key.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment