From 214f200ad9b385848908b8e14aea853fa67e9662 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Sun, 27 Dec 2020 16:27:33 +0000 Subject: [PATCH] Check for existing loaded SSH keys --- roles/home-cli/files/shrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/home-cli/files/shrc b/roles/home-cli/files/shrc index b302a3d..40ff3d0 100644 --- a/roles/home-cli/files/shrc +++ b/roles/home-cli/files/shrc @@ -325,7 +325,7 @@ case $- in ;; esac -if test -S "$SSH_AUTH_SOCK" && test -r "$HOME/.ssh/id_ed25519" && [ $(ssh-add -l | grep "$HOME/.ssh/id_ed25519" | wc -l) = 0 ]; then +if test -S "$SSH_AUTH_SOCK" && test -r "$HOME/.ssh/id_ed25519" && [ $(ssh-add -l | egrep "acp-(home|work) \(ED25519\)" | wc -l) = 0 ]; then ssh-add "$HOME/.ssh/id_ed25519" fi