diff options
Diffstat (limited to '.bash/aliases.bash')
-rw-r--r-- | .bash/aliases.bash | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/.bash/aliases.bash b/.bash/aliases.bash index d104328..c6650e0 100644 --- a/.bash/aliases.bash +++ b/.bash/aliases.bash @@ -73,7 +73,10 @@ alias sshk='ssh -o PasswordAuthentication=yes -o PreferredAuthentications=keyboa alias sshg="ssh-with-gpg" function add-sshagent-init { for KEY in "${SSHKEYS[@]}";do - ssh-add "$KEY" + FFPRINT="$(ssh-keygen -Esha256 -lf "$KEY")" + if ! ssh-add -l 2>/dev/null | grep "$FFPRINT" >/dev/null; then + ssh-add "$KEY" + fi done } # ----- FS ----- # |