lib/net/ssh.rb in net-ssh-3.2.0.rc1 vs lib/net/ssh.rb in net-ssh-3.2.0.rc2
- old
+ new
@@ -68,11 +68,11 @@
:languages, :logger, :paranoid, :password, :port, :proxy,
:rekey_blocks_limit,:rekey_limit, :rekey_packet_limit, :timeout, :verbose,
:known_hosts, :global_known_hosts_file, :user_known_hosts_file, :host_key_alias,
:host_name, :user, :properties, :passphrase, :keys_only, :max_pkt_size,
:max_win_size, :send_env, :use_agent, :number_of_password_prompts,
- :append_supported_algorithms, :non_interactive
+ :append_supported_algorithms, :non_interactive, :agent_socket_factory
]
# The standard means of starting a new SSH connection. When used with a
# block, the connection will be closed when the block terminates, otherwise
# the connection will just be returned. The yielded (or returned) value
@@ -190,9 +190,12 @@
# * :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
+ # * :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')}
#
# If +user+ parameter is nil it defaults to USER from ssh_config, or
# local username
def self.start(host, user=nil, options={}, &block)
invalid_options = options.keys - VALID_OPTIONS