lib/ztk/ssh.rb in ztk-1.9.1 vs lib/ztk/ssh.rb in ztk-1.10.0

- old
+ new

@@ -59,13 +59,16 @@ # end # # @author Zachary Patten <zachary AT jovelabs DOT com> class SSH < ZTK::Base require 'ostruct' + require 'tempfile' require 'net/ssh' + require 'net/ssh/gateway' require 'net/ssh/proxy/command' require 'net/sftp' + require 'net/scp' # Exit Signal Mappings EXIT_SIGNALS = { 1 => "SIGHUP", 2 => "SIGINT", @@ -119,11 +122,12 @@ # @param [Hash] configuration Configuration options hash. # @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. + # identity files to use for authentication. You can also supply keys as + # String blobs which will be rendered to temporary files automatically. # @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. @@ -158,10 +162,12 @@ :user_known_hosts_file => '/dev/null', :timeout => 60, :ignore_exit_status => false, :request_pty => true, :exit_code => 0, - :silence => false + :silence => false, + :keys => Array.new, + :proxy_keys => Array.new }.merge(configuration)) config.ui.logger.debug { "config=#{config.send(:table).inspect}" } end