class Net::SSH::HostKeyEntries::PubKey

regular public key entry

Public Class Methods

new(key, comment: nil) click to toggle source
# File lib/net/ssh/known_hosts.rb, line 13
def initialize(key, comment: nil) # rubocop:disable Lint/MissingSuper
  @key = key
  @comment = comment
end

Public Instance Methods

__getobj__() click to toggle source
# File lib/net/ssh/known_hosts.rb, line 30
def __getobj__
  Kernel.warn("Calling Net::SSH::Buffer methods on HostKeyEntries PubKey is deprecated")
  @key
end
matches_key?(server_key) click to toggle source
# File lib/net/ssh/known_hosts.rb, line 35
def matches_key?(server_key)
  @key.ssh_type == server_key.ssh_type && @key.to_blob == server_key.to_blob
end
ssh_type() click to toggle source
# File lib/net/ssh/known_hosts.rb, line 18
def ssh_type
  @key.ssh_type
end
ssh_types() click to toggle source
# File lib/net/ssh/known_hosts.rb, line 22
def ssh_types
  [ssh_type]
end
to_blob() click to toggle source
# File lib/net/ssh/known_hosts.rb, line 26
def to_blob
  @key.to_blob
end