Created
November 23, 2011 12:02
-
-
Save qbein/1388514 to your computer and use it in GitHub Desktop.
SSH Agent in Cygwin
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
export SSH_AUTH_SOCK=/tmp/.ssh-socket | |
ssh-add -l 2>&1 > /dev/null | |
if [ $? = 2 ]; then | |
# Exit status 2 means we could not add to agent | |
ssh-agent -s -a $SSH_AUTH_SOCK > /tmp/.ssh-script | |
./tmp/.ssh-script | |
echo $SSH_AGENT_PID > /tmp/.ssh-agent-pid | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment