From: Thufir Date: 2012-03-26T13:59:56+09:00 Subject: Re: net/ssh telnet set port 119 (nntp) On Mon, 26 Mar 2012 12:49:33 +0900, Iain Davis wrote: >>     4  s = Net::SSH::Telnet.new( >>     5          "Dump_log" => "/dev/stdout", 6          "Host" => >>     "127.0.0.1:119", > > s = Net::SSH::Telnet.new( > "Dump_log" => "/dev/stdout", > "Host" => "127.0.0.1", > "Port" => 119 as part > ... ah, ok. I thought I'd tried that, but apparently not. There's no login, I just would like to pass some commands to leafnode and get the response. Am I not getting the output correctly? thufir@dur:~/ruby/ssh$ thufir@dur:~/ruby/ssh$ ruby ssh.rb trying to connect... # 0x00000: 54 72 79 69 6e 67 20 31 32 37 2e 30 2e 30 2e 31 Trying 127.0.0.1 # 0x00010: 2e 2e 2e 0a .... /home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/net-ssh-telnet-0.0.2/lib/net/ ssh/telnet.rb:219:in `rescue in initialize': timed out while opening a connection to the host (Timeout::Error) from /home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/net-ssh- telnet-0.0.2/lib/net/ssh/telnet.rb:208:in `initialize' from ssh.rb:5:in `new' from ssh.rb:5:in `
' 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 "Host" => "127.0.0.1", 7 "Port" => "119" 8 ) 9 puts "Logged in" 10 putss.cmd("group comp.lang.ruby") thufir@dur:~/ruby/ssh$ thanks, Thufir