require 'strscan' require 'net/ssh/buffer' module Net; module SSH # Searches an OpenSSH-style known-host file for a given host, and returns all # matching keys. This is used to implement host-key verification, as well as # to determine what key a user prefers to use for a given host. # # This is used internally by Net::SSH, and will never need to be used directly # by consumers of the library. class KnownHosts if defined?(OpenSSL::PKey::EC) SUPPORTED_TYPE = %w(ssh-rsa ssh-dss ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521) else SUPPORTED_TYPE = %w(ssh-rsa ssh-dss) end class <