Created
November 4, 2010 07:02
-
-
Save hvr/662196 to your computer and use it in GitHub Desktop.
Show key fingerprints of public keys in .ssh/authorized_keys file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
( while read L | |
do echo $L > /tmp/pubkey | |
printf "%-16s => " $(cut -f 3 -d ' ' /tmp/pubkey) | |
ssh-keygen -l -f /tmp/pubkey | |
done | |
rm /tmp/pubkey | |
) < .ssh/authorized_keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have some comments & blank lines in my authorized_keys file, so I added a check to ignore those.