class Net::SSH::Authentication::Methods::Hostbased

  1. lib/net/ssh/authentication/methods/hostbased.rb
Parent: Methods

Implements the host-based SSH authentication method.

Methods

Public Instance

  1. authenticate

Included modules

  1. Constants

Public Instance methods

authenticate (next_service, username, password=nil)

Attempts to perform host-based authorization of the user by trying all known keys.

[show source]
# File lib/net/ssh/authentication/methods/hostbased.rb, line 14
def authenticate(next_service, username, password=nil)
  return false unless key_manager

  key_manager.each_identity do |identity|
    return true if authenticate_with(identity, next_service,
      username, key_manager)
  end

  return false
end