Ruby library for parsing SSH public keys and certificates
Перейти к файлу
Ben Toews 0eadaa156d
bump version
2019-01-31 08:43:20 -07:00
lib bump version 2019-01-31 08:43:20 -07:00
spec rencode public keys into raw and use these for fingerprinting 2019-01-30 13:58:37 -07:00
.gitignore add gitignore 2019-01-23 14:02:56 -07:00
Gemfile first commit 2019-01-17 10:47:31 -07:00
Gemfile.lock bump version 2019-01-31 08:43:20 -07:00
LICENSE.md change ownership 2019-01-25 09:06:18 -07:00
README.md license, readme, etc... 2019-01-23 14:00:15 -07:00
ssh_data.gemspec change ownership 2019-01-25 09:06:18 -07:00

README.md

ssh_data

This is a Ruby library for parsing SSH public keys and certificates.

Installation

gem install ssh_data

Usage

require "ssh_data"

key_data = File.read("~/.ssh/id_rsa.pub")
key = SSHData::PublicKey.parse(key_data)
#=> <SSHData::PublicKey::RSA>

cert_data = = File.read("~/.ssh/id_rsa-cert.pub")
cert = SSHData::Certificate.parse(cert_data)
#=> <SSHData::PublicKey::Certificate>

cert.key_id
#=> "mastahyeti"

cert.public_key
#=> <SSHData::PublicKey::RSA>