ssh keyのfingerprint

ssh鍵のfingerprintの表示方法について、ちょっとしたことだが知らなかったので備忘録。

$ ssh-keygen -l -f id_dsa.pub
1024 xx:xx: .... xx:xx id_dsa.pub
$

"-f"オプションで鍵ファイルを指定して、"-l"オプションでfingerprintを表示。以下はmanページより。

$ man ssh-keygen
....
     -l      Show fingerprint of specified public key file.  Private RSA1 keys
             are also supported.  For RSA and DSA keys ssh-keygen tries to
             find the matching public key file and prints its fingerprint.
....