Guest User

Untitled

a guest
Jul 16th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. agent="$HOME/.ssh-agent-$USER"
  2. if [ -S "$SSH_AUTH_SOCK" ]; then
  3. case $SSH_AUTH_SOCK in
  4. /tmp/*/agent.[0-9]*)
  5. ln -snf "$SSH_AUTH_SOCK" $agent && export SSH_AUTH_SOCK=$agent
  6. esac
  7. elif [ -S $agent ]; then
  8. export SSH_AUTH_SOCK=$agent
  9. else
  10. echo "no ssh-agent"
  11. fi
Add Comment
Please, Sign In to add comment