Skip to content

Instantly share code, notes, and snippets.

@gx86
Last active August 29, 2015 13:56
Show Gist options
  • Save gx86/9178869 to your computer and use it in GitHub Desktop.
Save gx86/9178869 to your computer and use it in GitHub Desktop.
SSH Key Forward Fix for .bashrc
# http://qq.is/article/ssh-keys-through-screen
# Predictable SSH authentication socket location.
SOCK="/tmp/ssh-agent-$USER-screen"
if test $SSH_AUTH_SOCK && [ $SSH_AUTH_SOCK != $SOCK ]
then
rm -f /tmp/ssh-agent-$USER-screen
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