Skip to content

Instantly share code, notes, and snippets.

@micmro
Last active Jan 12, 2017
Embed
What would you like to do?
Automatically add ssh key to ssh-agent in shell if it had not been added yet
# add ssh key to ssh-agent if it had not been added yet
ssh-add -l | grep -q "$HOME/.ssh/id_rsa" || ssh-add $HOME/.ssh/id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment