Do not type your passphrase anymore using ssh-agent within Cygwin

In order not to type your passphrase everytime you connect to a server using ssh, put the code below in your own bashrc file :

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
Then reload your shell configuration by issuing the following command : source .bashrc

You will be asked to type once your passphrase and that’s it ! If you use keys-based authentication, do not forget to copy your public key to the servers you often connect to with the utility ssh-copy-id! ssh-agent will be very useful for you !

Advertisements

3 thoughts on “Do not type your passphrase anymore using ssh-agent within Cygwin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s