Last active
October 16, 2018 17:13
-
-
Save popmonkey/1ffa576eae1d53ad73b912e15f83cebb to your computer and use it in GitHub Desktop.
load ssh keys into ssh key agent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# keys | |
for key in # list or glob of identities | |
do | |
KEY_SIG=$(cat ~/.ssh/$key.pub) | |
if [ `ssh-add -L | grep "$KEY_SIG" | wc -l` -ne 1 ] ; then ssh-add ~/.ssh/$key ; fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment