Basically the same as the Strict verifier, but does not try to actually verify a connection if the server is the localhost and the port is a nonstandard port number. Those two conditions will typically mean the connection is being tunnelled through a forwarded port, so the known-hosts file will not be helpful (in general).
Tries to determine if the connection is being tunnelled, and if so, returns true. Otherwise, performs the standard strict verification.
# File lib/net/ssh/verifiers/lenient.rb, line 13 13: def verify(arguments) 14: return true if tunnelled?(arguments) 15: super 16: end
A connection is potentially being tunnelled if the port is not 22, and the ip refers to the localhost.
# File lib/net/ssh/verifiers/lenient.rb, line 22 22: def tunnelled?(args) 23: return false if args[:session].port == Net::SSH::Transport::Session::DEFAULT_PORT 24: 25: ip = args[:session].peer[:ip] 26: return ip == "127.0.0.1" || ip == "::1" 27: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.