Skip to content

Instantly share code, notes, and snippets.

@staylorx
Created March 25, 2020 14:21
Show Gist options
  • Save staylorx/070881b064ad1c8e9971697b9895f65f to your computer and use it in GitHub Desktop.
Save staylorx/070881b064ad1c8e9971697b9895f65f to your computer and use it in GitHub Desktop.
Add to .bashrc to manage SSH private key
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