Skip to content

Instantly share code, notes, and snippets.

@aroemen
Created April 19, 2013 13:00
Show Gist options
  • Save aroemen/5420194 to your computer and use it in GitHub Desktop.
Save aroemen/5420194 to your computer and use it in GitHub Desktop.
Checks if a SSH key is loaded and loads it if not loaded
# load ssh key
keyloaded=$(ssh-add -l|grep aroemen -c)
if [ $keyloaded == '0' ]
then
ssh-add {path to ssh key}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment