Calculate RSA key fingerprint

后端 未结 14 1606
别那么骄傲
别那么骄傲 2020-11-28 16:55

I need to do the SSH key audit for GitHub, but I am not sure how do find my RSA key fingerprint. I originally followed a guide to generate an SSH key on Linux.

What

14条回答
  •  清酒与你
    2020-11-28 17:23

    Sometimes you can have a bunch of keys in your ~/.ssh directory, and don't know which matches the fingerprint shown by GitHub/Gitlab/etc.

    Here's how to show the key filenames and MD5 fingerprints of all the keys in your ~/.ssh directory:

    cd ~/.ssh
    find . -type f -exec printf "\n{}\n" \; -exec ssh-keygen -E md5 -lf {} \;
    

    (For what the parameters mean, refer to this answer about the find command.

    Note that the private/public files that belong to one key have the same fingerprint, so you'll see duplicates.

提交回复
热议问题