Is there a simple way to get a list of all fingerprints entered in the .ssh/authorized_keys || .ssh/authorized_keys2 file?
ssh-keygen -l -f .ssh/authorized_keys
will only return fingerprint of first line / entry / publickey
hack with awk:
awk 'BEGIN {
while (getline < ".ssh/authorized_keys") {
if ($1!~"ssh-(r|d)sa") {continue}
print "Fingerprint for "$3
system("echo " "\""$0"\"> /tmp/authorizedPublicKey.scan; \
ssh-keygen -l -f /tmp/authorizedPublicKey.scan; \
rm /tmp/authorizedPublicKey.scan"
)
}
}'
but is there an easier way or ssh command I didn't find?