ssh-fingerprint
Generate a fingerprint given an SSH public key (without ssh-keygen
or external dependencies)
Installing
ssh-fingerprint is distributed as a gem. Install it through the gem
command or add it to your Gemfile
:
Installing through gem
$ gem install ssh-fingerprint
Installing through your Gemfile
gem 'ssh-fingerprint'
Usage
Using it is really simple. Read the key content to a variable and call SSHFingerprint.compute
method. Example:
require 'ssh-fingerprint'
key = File.read(File.expand_path('~/.ssh/id_rsa.pub'))
puts SSHFingerprint.compute(key)
Pull requests are welcome!