lib/rye/box.rb in rye-0.8.17 vs lib/rye/box.rb in rye-0.8.18

- old
+ new

@@ -648,12 +648,12 @@ rescue Net::SSH::AuthenticationFailed => ex print "\a" if retried == 0 && @rye_info # Ring the bell once retried += 1 if STDIN.tty? && retried <= 3 STDERR.puts "Passwordless login failed for #{@rye_user}" - @rye_opts[:password] = highline.ask("Password: ") { |q| q.echo = '' } + @rye_opts[:password] = highline.ask("Password: ") { |q| q.echo = '' }.strip @rye_opts[:auth_methods] ||= [] - @rye_opts[:auth_methods] << 'password' + @rye_opts[:auth_methods].push *['keyboard-interactive', 'password'] retry else raise Net::SSH::AuthenticationFailed end end