Last active
January 23, 2019 20:15
-
-
Save spazm/32c85c61d83d48dbc8a0b40e96a599bd to your computer and use it in GitHub Desktop.
ssh rc file ( `.ssh/rc` ) that symlinks ssh auth sock to a known location.
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
MY_SSH_AUTH_SOCK=$HOME/.ssh/ssh_auth_sock | |
if [ -n "$SSH_AUTH_SOCK" ] ; then | |
if [ -L $MY_SSH_AUTH_SOCK ] && [ -e $MY_SSH_AUTH_SOCK ]; then | |
[ -n "$DEBUG" ] && echo "SSH_AUTH_SOCK is still valid" | |
else | |
[ -n "$DEBUG" ] && echo "linking SSH_AUTH_SOCK to $MY_SSH_AUTH_SOCK" | |
ln -fs "$SSH_AUTH_SOCK" "$MY_SSH_AUTH_SOCK" | |
fi | |
fi | |
[ -n "$DEBUG" ] && ls -l $MY_SSH_AUTH_SOCK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment