ssh-fingerprints.sh to get fingerprints of all keys from file

This commit is contained in:
Ruzicka Pavel 2016-09-19 04:04:14 +02:00
parent 187a19b079
commit 36735dfaa2

10
ssh-fingerprints.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
function fingerprints() {
local file="$1"
while read l; do
[[ -n $l && ${l###} = $l ]] && ssh-keygen -l -f /dev/stdin <<<$l
done < $file
}
fingerprints "$1"