Created
December 9, 2010 03:42
-
-
Save hirocaster/734306 to your computer and use it in GitHub Desktop.
$SSH_AUTH_SOCK to Automatic Symbolic Link
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
agent="$HOME/.ssh-agent-$USER" | |
if [ -S "$SSH_AUTH_SOCK" ]; then | |
case $SSH_AUTH_SOCK in | |
/tmp/*/agent.[0-9]*) | |
ln -snf "$SSH_AUTH_SOCK" $agent && export SSH_AUTH_SOCK=$agent | |
esac | |
elif [ -S $agent ]; then | |
export SSH_AUTH_SOCK=$agent | |
else | |
echo "no ssh-agent" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment