delano / rye

Safe, parallel access to Unix shells from Ruby
http://delano.github.com/rye
MIT License
234 stars 32 forks source link

Unable to make :password work ('no implicit conversion of Hash into String') #62

Open DannyBen opened 9 years ago

DannyBen commented 9 years ago

I must be missing something obvious, but I am unable to make rye connect to my local vagrant box that is password protected (not SSH key).

This is what I tried:

puts "Works, but prompts for pass"
rbox = Rye::Box.new
p rbox.pwd.to_s

puts "Fails"
rbox = Rye::Box.new user:user, password:password
p rbox.pwd.to_s

puts "Fails"
rbox = Rye::Box.new user:user, password:password, password_prompt:false
p rbox.pwd.to_s

This is the output trace I get

/home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:70:in `initialize': no implicit conversion of Hash into String (TypeError)
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:70:in `open'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:70:in `block in initialize'
from /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:74:in `timeout'
from /home/vagrant/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:125:in `timeout'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:67:in `initialize'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `new'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `start'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/rye-0.9.13/lib/rye/box.rb:669:in `connect'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/rye-0.9.13/lib/rye/box.rb:773:in `run_command'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/rye-0.9.13/lib/rye/cmd.rb:69:in `pwd'
from ./test.rb:12:in `<main>'