Skip to content

Instantly share code, notes, and snippets.

@vipickering
Created January 3, 2017 11:44
Show Gist options
  • Save vipickering/da8c533f2d135e2c674b049922073bda to your computer and use it in GitHub Desktop.
Save vipickering/da8c533f2d135e2c674b049922073bda to your computer and use it in GitHub Desktop.
# Add SSH to login
# The first time terminal is opened after start, password will be entered.
# All subsequent requests will use SSH Agent.
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval `ssh-agent`
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
ssh-add -l > /dev/null || ssh-add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment