lib/rcmd.rb in rcmd-1.6.4 vs lib/rcmd.rb in rcmd-1.6.5

- old
+ new

@@ -40,10 +40,19 @@ # Array containing the current iterations thread objects. attr_accessor :threads # Boolean for debug output attr_accessor :debug + + # Boolean for using only ssh-keys or not + attr_accessor :keys_only + + # Integer for ssh sesison timeout value + attr_accessor :timeout + + # String fo path to user_known_hosts_file + attr_accessor :hosts_file end # Main method for this module which should be called after the correct variables have been set. # # We iterate over the host list until it is empty, creating all @@ -93,10 +102,10 @@ # Prepare threads @threads = [ ] num_threads.times do |i| @threads[i] = Thread.new { begin - conn_options = { :user => @user, :host => @queue.pop, :password => nil, :quiet => @quiet, :debug => @debug } + conn_options = { :user => @user, :host => @queue.pop, :password => nil, :quiet => @quiet, :debug => @debug, :timeout => @timeout, :keys_only => @keys_only, :user_known_hosts_file => @hosts_file} STDERR.print "DEBUG :: Connecting to #{conn_options[:host]}\n" if conn_options[:debug] Net::SSH.start(conn_options[:host], conn_options[:user], :password => conn_options[:passwd]) do |session| # Open channel for input/output control session.open_channel do |channel| channel.on_data do |ch, data|