Skip to content

Instantly share code, notes, and snippets.

@rickhull
Created December 1, 2015 22:46
Show Gist options
  • Save rickhull/9c9c056f040afd11329d to your computer and use it in GitHub Desktop.
Save rickhull/9c9c056f040afd11329d to your computer and use it in GitHub Desktop.
Rye::Box vs Rye::Set
irb(main):001:0> b = Rye::Box.new('172.22.1.111')
=> #<Rye::Box:172.22.1.111 name=172.22.1.111 cwd= umask= env="" safe=true opts={:port=>nil, :keys=>["/home/rwh/.ssh/id_rsa"], :paranoid=>true} keys=["/home/rwh/.ssh/id_rsa"]>
irb(main):002:0> b.uname
=> [Linux, , 0, ]
# ok, works as expected
irb(main):003:0> s = Rye::Set.new
=> #<Rye::Set:default parallel=false opts={:user=>"rwh", :safe=>true, :port=>22, :keys=>[], :password=>nil, :proxy=>nil, :debug=>nil, :error=>#<IO:<STDERR>>} boxes=[]>
irb(main):004:0> s.add_boxes '172.22.1.111'
=> #<Rye::Set:default parallel=false opts={:user=>"rwh", :safe=>true, :port=>22, :keys=>[], :password=>nil, :proxy=>nil, :debug=>nil, :error=>#<IO:<STDERR>>} boxes=[#<Rye::Box:172.22.1.111 name=172.22.1.111 cwd= umask= env="" safe=true opts={:port=>22, :keys=>[], :user=>"rwh", :password=>nil, :proxy=>nil, :paranoid=>true} keys=["/home/rwh/.ssh/id_rsa"]>]>
irb(main):005:0> s.uname
Passwordless login failed for rwh
Password: IRB::Abort: abort then interrupt!
# why does this behave differently? how can I make it behave like Rye::Box?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment