[enh] Display only used fingerprint in bootprompt

This commit is contained in:
ljf (zamentur) 2018-09-15 15:14:51 +02:00 committed by Alexandre Aubin
parent 8e0086d493
commit b5896e88c3

View file

@ -5,7 +5,7 @@ ip=$(hostname --all-ip-address)
# Fetch SSH fingerprints # Fetch SSH fingerprints
i=0 i=0
for key in /etc/ssh/ssh_host_*_key.pub ; do for key in /etc/ssh/ssh_host_{rsa,ecdsa,ed25519}_key.pub ; do
output=$(ssh-keygen -l -f $key) output=$(ssh-keygen -l -f $key)
fingerprint[$i]=" - $(echo $output | cut -d' ' -f2) $(echo $output| cut -d' ' -f4)" fingerprint[$i]=" - $(echo $output | cut -d' ' -f2) $(echo $output| cut -d' ' -f4)"
i=$(($i + 1)) i=$(($i + 1))