summaryrefslogtreecommitdiff
path: root/lib/net/ssh/authentication/methods/abstract.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/ssh/authentication/methods/abstract.rb')
-rw-r--r--lib/net/ssh/authentication/methods/abstract.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/net/ssh/authentication/methods/abstract.rb b/lib/net/ssh/authentication/methods/abstract.rb
index 07aa5f3..f023011 100644
--- a/lib/net/ssh/authentication/methods/abstract.rb
+++ b/lib/net/ssh/authentication/methods/abstract.rb
@@ -20,12 +20,22 @@ module Net
# this.
attr_reader :key_manager
+ # So far only affects algorithms used for rsa keys, but can be
+ # extended to other keys, e.g after reading of
+ # PubkeyAcceptedAlgorithms option from ssh_config file is implemented.
+ attr_reader :pubkey_algorithms
+
# Instantiates a new authentication method.
def initialize(session, options = {})
@session = session
@key_manager = options[:key_manager]
@options = options
@prompt = options[:password_prompt]
+ @pubkey_algorithms = options[:pubkey_algorithms] \
+ || %w[rsa-sha2-256-cert-v01@openssh.com
+ ssh-rsa-cert-v01@openssh.com
+ rsa-sha2-256
+ ssh-rsa]
self.logger = session.logger
end