Created
February 26, 2015 15:24
-
-
Save freyes/18e67d500557855b8525 to your computer and use it in GitHub Desktop.
launch ssh-agent and load env variables
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
# put this in ~/.bashrc | |
test -f ~/.ssh/agent && source ~/.ssh/agent > /dev/null | |
if [ "x$SSH_AGENT_PID" != "x" ]; then | |
kill -0 $SSH_AGENT_PID || ssh-agent -s -a $HOME/.ssh/agent.socket > ~/.ssh/agent | |
else | |
ssh-agent -s -a $HOME/.ssh/agent.socket > ~/.ssh/agent | |
fi | |
source ~/.ssh/agent > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment