Created
July 23, 2015 12:58
-
-
Save lsd/df0f3b2ea6bba6a1c97f to your computer and use it in GitHub Desktop.
Function to add PGP keys by looping ~/.ssh/auto and ssh-shad
This file contains hidden or 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
# line 5 is still noisy | |
# this won't block if ssh-add requires password. you will be prompted to enter it after loop | |
function add_pgp_keys { | |
for pgp in $(cat "$HOME/.ssh/auto"); do | |
echo $pgp | |
ssh-add "/Users/`whoami`/.ssh/$pgp" &2>1 > /dev/null | |
echo "ssh-add result: $?" | |
done | |
ssh-add -l | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed and modified part of
.zshrc
in https://github.com/sorin-ionescu/prezto