Skip to content

Instantly share code, notes, and snippets.

@mowings
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mowings/cdab01441a20ba8461a8 to your computer and use it in GitHub Desktop.
Save mowings/cdab01441a20ba8461a8 to your computer and use it in GitHub Desktop.
Keep tmux from losing your ssh socket between sessions
# Predictable SSH authentication socket location.
SOCK="$HOME/.ssh/ssh-agent-sock"
if test $SSH_AUTH_SOCK && [ $SSH_AUTH_SOCK != $SOCK ]
then
ln -sf $SSH_AUTH_SOCK $SOCK
export SSH_AUTH_SOCK=$SOCK
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment