lib/ztk/ssh.rb in ztk-1.2.0 vs lib/ztk/ssh.rb in ztk-1.3.0

- old
+ new

@@ -117,36 +117,44 @@ autoload :Bootstrap, 'ztk/ssh/bootstrap' autoload :Command, 'ztk/ssh/command' autoload :Download, 'ztk/ssh/download' autoload :Exec, 'ztk/ssh/exec' + autoload :File, 'ztk/ssh/file' autoload :Upload, 'ztk/ssh/upload' include ZTK::SSH::Bootstrap include ZTK::SSH::Command include ZTK::SSH::Download include ZTK::SSH::Exec + include ZTK::SSH::File include ZTK::SSH::Upload # @param [Hash] configuration Configuration options hash. - # @option config [String] :host_name Server hostname to connect to. - # @option config [String] :user Username to use for authentication. - # @option config [String, Array<String>] :keys A single or series of + # @option configuration [String] :host_name Server hostname to connect to. + # @option configuration [String] :user Username to use for authentication. + # @option configuration [String, Array<String>] :keys A single or series of # identity files to use for authentication. - # @option config [String] :password Password to use for authentication. - # @option config [Integer] :timeout SSH connection timeout to use. - # @option config [Boolean] :compression Weither or not to use compression - # for this session. - # @option config [Integer] :compression_level What level of compression to - # use. - # @option config [String] :proxy_host_name Server hostname to proxy through. - # @option config [String] :proxy_user Username to use for proxy + # @option configuration [String] :password Password to use for authentication. + # @option configuration [Integer] :timeout (60) SSH connection timeout in + # seconds to use. + # @option configuration [Boolean] :compression (false) Whether or not to use + # compression for this session. + # @option configuration [Integer] :compression_level What level of + # compression to use. + # @option configuration [String] :proxy_host_name Server hostname to proxy + # through. + # @option configuration [String] :proxy_user Username to use for proxy # authentication. - # @option config [Boolean] :request_pty Weither or not we should try to - # obtain a PTY - # @option config [String, Array<String>] :proxy_keys A single or series of - # identity files to use for authentication with the proxy. + # @option configuration [Boolean] :request_pty (true) Whether or not we + # should try to obtain a PTY + # @option configuration [Boolean] :ignore_exit_status (false) Whether or not + # we should throw an exception if the exit status is not kosher. + # @option configuration [Boolean] :forward_agent (true) Whether or not to + # enable SSH agent forwarding. + # @option configuration [String, Array<String>] :proxy_keys A single or + # series of identity files to use for authentication with the proxy. def initialize(configuration={}) super({ :forward_agent => true, :compression => false, :user_known_hosts_file => '/dev/null', @@ -179,10 +187,9 @@ # Launches an SSH console, replacing the current process with the console # process. # # @example Launch a console: - # $logger = ZTK::Logger.new(STDOUT) # ssh = ZTK::SSH.new # ssh.config do |config| # config.user = ENV["USER"] # config.host_name = "127.0.0.1" # end