class Net::SSH::HostKeyEntries::CertAuthority
@cert-authority entry
Public Class Methods
new(key, comment: nil)
click to toggle source
# File lib/net/ssh/known_hosts.rb, line 53 def initialize(key, comment: nil) @key = key @comment = comment end
Public Instance Methods
matches_key?(server_key)
click to toggle source
# File lib/net/ssh/known_hosts.rb, line 58 def matches_key?(server_key) if ssh_types.include?(server_key.ssh_type) server_key.signature_valid? && (server_key.signature_key.to_blob == @key.to_blob) else false end end
ssh_types()
click to toggle source
# File lib/net/ssh/known_hosts.rb, line 42 def ssh_types %w[ ecdsa-sha2-nistp256-cert-v01@openssh.com ecdsa-sha2-nistp384-cert-v01@openssh.com ecdsa-sha2-nistp521-cert-v01@openssh.com ssh-ed25519-cert-v01@openssh.com ssh-rsa-cert-v01@openssh.com ssh-rsa-cert-v00@openssh.com ] end