Created
January 12, 2015 00:01
-
-
Save andrewspiers/7c7b09383a959b29005a to your computer and use it in GitHub Desktop.
function to get the fingerprints of remote servers
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
function ssh-keyscan-fingerprint { | |
#function to get the fingerprints of remote servers | |
orig_umask=$(umask) | |
umask 0077 | |
t=$(mktemp) | |
chmod 0700 ${t} | |
while [ ! -z $1 ] ; do | |
ssh-keyscan "$1" > ${t} | |
ssh-keygen -l -f ${t} | |
shift | |
done | |
rm $t | |
umask ${orig_umask} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment