class Net::SSH::KnownHosts

def search_in(files, host, options = {})

the +files+ array. Returns the list of keys.
Search for all known keys for the given host, in every file given in
def search_in(files, host, options = {})
  files.flat_map { |file| KnownHosts.new(file).keys_for(host, options) }
end