Created
March 7, 2012 18:42
-
-
Save elskwid/1995048 to your computer and use it in GitHub Desktop.
Display the fingerprints for all your public keys
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
#! /usr/bin/ruby | |
home_dir = ENV["HOME"] | |
ssh_dir = "#{home_dir.strip}/.ssh/*.pub" | |
puts "Checking #{ssh_dir} ..." | |
puts | |
Dir["#{home_dir.strip}/.ssh/*.pub"].each do |pk| | |
puts "Fingerprint for #{pk}" | |
fingerprint = `ssh-keygen -lf #{pk}` | |
puts " #{fingerprint.strip}" | |
puts | |
end | |
puts "All done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AWESOME!!!