Ruby library for parsing SSH public keys and certificates
Перейти к файлу
Ben Toews d19cb6f478
bump version to 0.0.9
2019-06-10 15:44:43 -06:00
lib bump version to 0.0.9 2019-06-10 15:44:43 -06:00
spec sign certificates with RSA SH2 variants 2019-06-10 15:01:33 -06:00
.gitignore add gitignore 2019-01-23 14:02:56 -07:00
CONTRIBUTING.md update docs for dependencies and testing 2019-01-31 11:01:20 -07:00
Gemfile first commit 2019-01-17 10:47:31 -07:00
Gemfile.lock bump version to 0.0.9 2019-06-10 15:44:43 -06:00
LICENSE.md change ownership 2019-01-25 09:06:18 -07:00
README.md rename PublicKey and Certificate `parse` methods `parse_openssh` 2019-02-11 12:06:20 -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_openssh(key_data)
#=> <SSHData::PublicKey::RSA>

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

cert.key_id
#=> "mastahyeti"

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