Skip to content

Instantly share code, notes, and snippets.

@elucid
Created November 30, 2016 15:56
Show Gist options
  • Save elucid/e5d1cb1bd93b36db838a92907ffbb9a8 to your computer and use it in GitHub Desktop.
Save elucid/e5d1cb1bd93b36db838a92907ffbb9a8 to your computer and use it in GitHub Desktop.
fix ssh auth sock on tmux attach
# Predictable SSH authentication socket location.
SOCK="/tmp/ssh-agent-$USER-screen"
if test $SSH_AUTH_SOCK && [ $SSH_AUTH_SOCK != $SOCK ]
then
rm -f $SOCK
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