Sha256: cb7b187bec28e642478572cd9c70ad9541c8ba5350659e34c4b738bf951581c7

Contents?: true

Size: 749 Bytes

Versions: 117

Compression:

Stored size: 749 Bytes

Contents

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

Version data entries

117 entries across 104 versions & 11 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/verifiers/strict.rb
vagrant-unbundled-2.1.2.0 vendor/bundle/ruby/2.3.0/gems/net-ssh-4.2.0/lib/net/ssh/verifiers/strict.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/verifiers/strict.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/net-ssh-4.2.0/lib/net/ssh/verifiers/strict.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.2.0/lib/net/ssh/verifiers/strict.rb
vagrant-unbundled-2.1.1.0 vendor/bundle/ruby/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/verifiers/strict.rb
vagrant-unbundled-2.0.4.0 vendor/bundle/ruby/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/verifiers/strict.rb
vagrant-unbundled-2.0.3.0 vendor/bundle/ruby/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/verifiers/strict.rb
net-ssh-5.0.0.beta1 lib/net/ssh/verifiers/strict.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/verifiers/strict.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/verifiers/strict.rb
vagrant-unbundled-2.0.1.0 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/verifiers/strict.rb
vagrant-unbundled-2.0.0.1 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/verifiers/strict.rb
net-ssh-4.2.0 lib/net/ssh/verifiers/strict.rb
vagrant-unbundled-1.9.8.1 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/verifiers/strict.rb
vagrant-unbundled-1.9.7.1 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/verifiers/strict.rb
net-ssh-4.2.0.rc2 lib/net/ssh/verifiers/strict.rb
net-ssh-4.2.0.rc1 lib/net/ssh/verifiers/strict.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/verifiers/strict.rb
savant-echo-1.0.4 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/lib/net/ssh/verifiers/strict.rb