Skip to content

Instantly share code, notes, and snippets.

@sylr
Created July 25, 2012 09:33
Show Gist options
  • Save sylr/3175289 to your computer and use it in GitHub Desktop.
Save sylr/3175289 to your computer and use it in GitHub Desktop.
SSH agent tweak for screen
# 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