Created
July 25, 2012 09:33
-
-
Save sylr/3175289 to your computer and use it in GitHub Desktop.
SSH agent tweak for screen
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
# SSH agent tweak for screen | |
export SSH_AUTH_SOCK_TMP=/tmp/$LOGNAME-ssh-agent.sock | |
# test link reference | |
if [ ! -e "$SSH_AUTH_SOCK_TMP" ]; then | |
# test that link exists | |
if [ -L "$SSH_AUTH_SOCK_TMP" ]; then | |
unlink $SSH_AUTH_SOCK_TMP | |
fi | |
ln -s $SSH_AUTH_SOCK $SSH_AUTH_SOCK_TMP | |
fi | |
export SSH_AUTH_SOCK_OLD=$SSH_AUTH_SOCK | |
export SSH_AUTH_SOCK=$SSH_AUTH_SOCK_TMP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment