Last active
February 4, 2016 07:15
-
-
Save Ruzzz/9476c1a3939dcabf06a0 to your computer and use it in GitHub Desktop.
Calc id_rsa.pub fingerprint
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
import sys | |
import base64 | |
import hashlib | |
// Alternative to: >ssh-keygen -E md5 -l -f id_rsa.pub | |
md5 = hashlib.md5() | |
md5.update(base64.b64decode(open('id_rsa.pub').read().split()[1])) | |
digest = md5.digest() | |
print (":".join("{:02x}".format(c) for c in digest)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment