lib/em-ssh/connection.rb
# Instantiates a new host-key verification class, based on the value of
# the parameter. When true or nil, the default Lenient verifier is
# returned. If it is false, the Null verifier is returned, and if it is
# :very, the Strict verifier is returned. If the argument happens to
# respond to :verify, it is returned directly. Otherwise, an exception
# is raised.
# Taken from Net::SSH::Session
Instantiates a new host-key verification class, based on the value of
the parameter. When true or nil, the default Lenient verifier is
returned. If it is false, the Null verifier is returned, and if it is
:very, the Strict verifier is returned. If the argument happens to
respond to :verify, it is returned directly. Otherwise, an exception
is raised.
Taken from Net::SSH::Session
Instantiates a new host - key verification class based on the value of the parameter . When true or nil the default Lenient verifier is returned . If it is false the Null verifier is returned and if it is : very the Strict verifier is returned . If the argument happens to respond to : verify it is returned directly . Otherwise an exception is raised . Taken from Net :: SSH :: Session
def select_host_key_verifier(paranoid)
        case paranoid
        when true, nil then
          Net::SSH::Verifiers::AcceptNewOrLocalTunnel.new
        when false then
          Net::SSH::Verifiers::Never.new
        when :very then
          Net::SSH::Verifiers::AcceptNew.new
        else
          if paranoid.respond_to?(:verify)
            paranoid
          else
            fail(@host, ArgumentError.new("argument to :paranoid is not valid: #{paranoid.inspect}"))
            close_connection
          end 
        end 
      end
def select_host_key_verifier ( paranoid ) case paranoid when true , nil then Net :: SSH :: Verifiers :: AcceptNewOrLocalTunnel . new when false then Net :: SSH :: Verifiers :: Never . new when :very then Net :: SSH :: Verifiers :: AcceptNew . new else if paranoid . respond_to? ( :verify ) paranoid else fail ( @host , ArgumentError . new ( "argument to :paranoid is not valid: #{paranoid.inspect}" ) ) close_connection end end end
Instantiates a new host-key verification class, based on the value of
the parameter.
Instantiates a new host - key verification class based on the value of the parameter .
# paranoid.respond_to?(:verify) # paranoid
paranoid
<not_specific>