lib/core/util/ssh.rb in nucleon-0.2.10 vs lib/core/util/ssh.rb in nucleon-0.2.11

- old
+ new

@@ -158,11 +158,11 @@ @@session_lock.synchronize do config = Config.ensure(options) ssh_options = Config.new({ :user_known_hosts_file => [ File.join(key_path, 'known_hosts'), File.join(key_path, 'known_hosts2') ], - :auth_methods => [ 'publickey' ], + :auth_methods => [ 'publickey', 'password' ], :paranoid => :very }, {}, true, false).import(Util::Data.subset(config, config.keys - [ :keypair, :key_dir, :key_name, :reset_conn ])) if private_key auth_id = [ session_id, private_key ].join('_') @@ -177,9 +177,11 @@ ssh_options[:keys] = [ @@auth[auth_id] ] else ssh_options[:keys_only] = true ssh_options[:key_data] = [ @@auth[auth_id].private_key ] end + else + ssh_options[:password] = config[:password] if config[:password] end ssh_options[:port] = port if reset || ! @@sessions.has_key?(session_id)