Last active
March 9, 2017 19:42
-
-
Save var-bin/a1b7b506572084e9b98e549745683fb5 to your computer and use it in GitHub Desktop.
Making SSH_AUTH_SOCK work between detaches in tmux/screen. Repository https://github.com/var-bin/terminalForCoder__WSD
This file contains hidden or 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
# Making SSH_AUTH_SOCK work between detaches in tmux/screen | |
if [[ ! -z "$SSH_AUTH_SOCK" -a "$SSH_AUTH_SOCK" != "$HOME/agent_sock" ]] | |
then | |
unlink "$HOME/agent_sock" 2>/dev/null | |
ln -s "$SSH_AUTH_SOCK" "$HOME/agent_sock" | |
export SSH_AUTH_SOCK="$HOME/agent_sock" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment