summaryrefslogtreecommitdiff
path: root/tools/write-ssh-key-fingerprints
diff options
context:
space:
mode:
Diffstat (limited to 'tools/write-ssh-key-fingerprints')
-rwxr-xr-xtools/write-ssh-key-fingerprints6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/write-ssh-key-fingerprints b/tools/write-ssh-key-fingerprints
index 9a081faa..7b2fc62c 100755
--- a/tools/write-ssh-key-fingerprints
+++ b/tools/write-ssh-key-fingerprints
@@ -3,8 +3,10 @@
echo
echo "#############################################################"
echo "-----BEGIN SSH HOST KEY FINGERPRINTS-----"
-ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub
-ssh-keygen -l -f /etc/ssh/ssh_host_dsa_key.pub
+for f in /etc/ssh/ssh_host_*key.pub; do
+ [ -f "$f" ] || continue
+ ssh-keygen -l -f "$f"
+done
echo "-----END SSH HOST KEY FINGERPRINTS-----"
echo "#############################################################"
} | logger -p user.info -s -t "ec2"