Anons79 Mini Shell

Directory : /opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/verifiers/
Upload File :
Current File : //opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/verifiers/strict.rb

require 'net/ssh/errors'
require 'net/ssh/known_hosts'
require 'net/ssh/verifiers/secure'

module Net; module SSH; module Verifiers

  # Does a strict host verification, looking the server up in the known
  # host files to see if a key has already been seen for this server. If this
  # server does not appear in any host file, this will silently add the
  # server. If the server does appear at least once, but the key given does
  # not match any known for the server, an exception will be raised (HostKeyMismatch).
  # Otherwise, this returns true.
  class Strict < Secure
    def verify(arguments)
      begin
        super
      rescue HostKeyUnknown => err
        err.remember_host!
        return true
      end
    end
  end

end; end; end

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]