Skip to content

Instantly share code, notes, and snippets.

@azalea
Last active April 17, 2020 19:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azalea/8828636 to your computer and use it in GitHub Desktop.
Save azalea/8828636 to your computer and use it in GitHub Desktop.
Remember passphrase in Cygwin
# only ask for my SSH key passphrase once!
# use existing ssh-agent if possible
if [ -f ${HOME}/.ssh-agent ]; then
. ${HOME}/.ssh-agent > /dev/null
fi
if [ -z "$SSH_AGENT_PID" -o -z "`/usr/bin/ps -a|/usr/bin/egrep \"^[ ]+$SSH_AGENT_PID\"`" ]; then
/usr/bin/ssh-agent > ${HOME}/.ssh-agent
. ${HOME}/.ssh-agent > /dev/null
fi
ssh-add ~/.ssh/id_rsa #This is the file with your private key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment