From: Thufir Date: 2012-03-26T02:25:43+09:00 Subject: Re: net/ssh telnet set port 119 (nntp) On Sun, 25 Mar 2012 19:49:44 +0900, Thufir wrote: > http://rubydoc.info/gems/net-ssh-telnet/0.0.2/frames > > I want to login to leafnode with something like: Well, I don't get it, I have no idea why the sample code doesn't work for me. It appears to be a matter of ?importing? the gem correctly. What's the correct syntax, please? How do you know what the syntax is to ? import? the gem correctly? thufir@dur:~/ruby/ssh$ thufir@dur:~/ruby/ssh$ ruby ssh.rb trying to connect... ssh.rb:10:in `
': undefined local variable or method `ssh' for main:Object (NameError) thufir@dur:~/ruby/ssh$ thufir@dur:~/ruby/ssh$ nl ssh.rb 1 require 'rubygems' 2 require 'net/ssh/telnet' 3 puts "trying to connect..." 4 s = Net::SSH::Telnet.new( 5 "Dump_log" => "/dev/stdout", 6 "Session" => ssh 7 ) 8 puts "Logged in" 9 p s.cmd("echo hello") thufir@dur:~/ruby/ssh$ thanks, Thufir