From b469e0c4255f8cd3a3aab414cba972a7e7c18be7 Mon Sep 17 00:00:00 2001 From: mrjk Date: Tue, 31 May 2022 01:30:12 -0400 Subject: [PATCH] Fix: Missed ssh keys when target is symlink --- lib/idmgr_mod_ssh.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/idmgr_mod_ssh.sh b/lib/idmgr_mod_ssh.sh index 7407d79..b6d30a8 100644 --- a/lib/idmgr_mod_ssh.sh +++ b/lib/idmgr_mod_ssh.sh @@ -401,11 +401,11 @@ idm_ssh_search_private_keys () pub_keys=$( { # Compat mode - find ~/.ssh/$id -maxdepth $maxdepth -name "${id}_*" -name '*pub' -name "*$id*" | sort + find -L ~/.ssh/$id -maxdepth $maxdepth -name "${id}_*" -name '*pub' -name "*$id*" | sort } | sort | uniq ) else - pub_keys=$(find ~/.ssh/$id -maxdepth $maxdepth -name '*pub' | sort) + pub_keys=$(find -L ~/.ssh/$id -maxdepth $maxdepth -name '*pub' | sort) fi # Get list of key