class Net::SSH::Authentication::Methods::Publickey

def authenticate(next_service, username, password = nil)

requires the presence of a key manager.
them succeed, returns +true+, otherwise returns +false+. This
username, trying each identity known to the key manager. If any of
Attempts to perform public-key authentication for the given
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)
  end
  return false
end