lib/net/ssh.rb in net-ssh-4.0.0.beta3 vs lib/net/ssh.rb in net-ssh-4.0.0.beta4

- old
+ new

@@ -151,10 +151,14 @@ # * :max_pkt_size => maximum size we tell the other side that is supported per # packet. Default is 0x8000 (32768 bytes). Increase to 0x10000 (65536 bytes) # for better performance if your SSH server supports it (most do). # * :max_win_size => maximum size we tell the other side that is supported for # the window. + # * :non_interactive => set to true if your app is non interactive and prefers + # authentication failure vs password prompt. Non-interactive applications + # should set it to true to prefer failing a password/etc auth methods vs. + # asking for password. # * :paranoid => either false, true, :very, or :secure specifying how # strict host-key verification should be (in increasing order here). # You can also provide an own Object which responds to +verify+. The argument # given to +verify+ is a hash consisting of the +:key+, the +:key_blob+, # the +:fingerprint+ and the +:session+. Returning true accepts the host key, @@ -179,23 +183,19 @@ # * :user_known_hosts_file => the location of the user known hosts file. # Set to an array to specify multiple user known hosts files. # Defaults to %w(~/.ssh/known_hosts ~/.ssh/known_hosts2). # * :use_agent => Set false to disable the use of ssh-agent. Defaults to # true - # * :non_interactive => set to true if your app is non interactive and prefers - # authentication failure vs password prompt # * :verbose => how verbose to be (Logger verbosity constants, Logger::DEBUG # is very verbose, Logger::FATAL is all but silent). Logger::FATAL is the # default. The symbols :debug, :info, :warn, :error, and :fatal are also # supported and are translated to the corresponding Logger constant. # * :append_all_supported_algorithms => set to +true+ to append all supported # algorithms by net-ssh. Was the default behaviour until 2.10 # * :number_of_password_prompts => Number of prompts for the password # authentication method defaults to 3 set to 0 to disable prompt for # password auth method - # * :non_interactive => non interactive applications should set it to true - # to prefer failing a password/etc auth methods vs asking for password # * :password_prompt => a custom prompt object with ask method. See Net::SSH::Prompt # # * :agent_socket_factory => enables the user to pass a lambda/block that will serve as the socket factory # Net::SSH::start(user,host,agent_socket_factory: ->{ UNIXSocket.open('/foo/bar') }) # example: ->{ UNIXSocket.open('/foo/bar')} @@ -262,10 +262,10 @@ # loaded (and an empty hash returned). Otherwise, +use_ssh_config+ may # be a file name (or array of file names) of SSH configuration file(s) # to read. # # See Net::SSH::Config for the full description of all supported options. - def self.configuration_for(host, use_ssh_config=true) + def self.configuration_for(host, use_ssh_config) files = case use_ssh_config when true then Net::SSH::Config.default_files when false, nil then return {} else Array(use_ssh_config) end