Skip to content

Instantly share code, notes, and snippets.

@madAndroid
Forked from gorsuch/ssh_fingerprint.rb
Created February 1, 2014 13:21
Show Gist options
  • Save madAndroid/8752298 to your computer and use it in GitHub Desktop.
Save madAndroid/8752298 to your computer and use it in GitHub Desktop.
require 'base64'
require 'digest/md5'
key = "your public key here"
# first decode the key
key_decoded = Base64.decode64(key)
# create an md5
md5 = Digest::MD5.hexdigest(key_decoded)
# convert that hash into a readable fingerprint
puts md5.scan(/.{1,2}/).join(':')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment