Skip to content

Instantly share code, notes, and snippets.

@jmather
Created August 29, 2012 18:33
Show Gist options
  • Save jmather/3516771 to your computer and use it in GitHub Desktop.
Save jmather/3516771 to your computer and use it in GitHub Desktop.
Turn on agent forwarding automatically
AGENTRUNNING=`ps x | grep agent | grep -v grep`
if [ -z "$AGENTRUNNING" ]; then
/usr/bin/ssh-agent -s > $HOME/.ssh/agent-env.sh
fi
source $HOME/.ssh/agent-env.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment