Created
November 30, 2016 15:56
-
-
Save elucid/e5d1cb1bd93b36db838a92907ffbb9a8 to your computer and use it in GitHub Desktop.
fix ssh auth sock on tmux attach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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