Class | Net::SSH::Authentication::Methods::Hostbased |
In: |
lib/net/ssh/authentication/methods/hostbased.rb
lib/net/ssh/authentication/methods/hostbased.rb |
Parent: | Abstract |
Implements the host-based SSH authentication method.
Attempts to perform host-based authorization of the user by trying all known keys.
# File lib/net/ssh/authentication/methods/hostbased.rb, line 14 14: def authenticate(next_service, username, password=nil) 15: return false unless key_manager 16: 17: key_manager.identities.each do |identity| 18: return true if authenticate_with(identity, next_service, 19: username, key_manager) 20: end 21: 22: return false 23: end
Attempts to perform host-based authorization of the user by trying all known keys.
# File lib/net/ssh/authentication/methods/hostbased.rb, line 14 14: def authenticate(next_service, username, password=nil) 15: return false unless key_manager 16: 17: key_manager.identities.each do |identity| 18: return true if authenticate_with(identity, next_service, 19: username, key_manager) 20: end 21: 22: return false 23: end