From: Brian Candler Date: 2011-05-28T05:00:56+09:00 Subject: Re: Net::Telnet into Net::SSH Josh Hurtado wrote in post #1001596: > So I am running my script from my box (making up IPs) at 192.168.0.254 > > The I am sshing into my jump box at 192.168.1.1 > > 192.168.0.254 -> 192.168.1.1 What sort of device is the jump box? Is it a Linux box, or a Cisco router running ssh, or something else? If it's a Linux box, then you probably want to use ssh port forwarding. Do it from the command line, as I showed before (using 'ssh' and 'telnet' commands), to prove it works and understand the principles. Then you can migrate to Ruby. > Also, would the syntax of my NET::TELNET be something like: > > port = ssh.forward.local(1234, "www.capify.org", 80) > NET::TELNET.new ( "user", "PASS", port) > ssh.loop { true } You'll need to run ssh.loop in a separate Thread: Thread.new { ssh.loop { true } } t = Net::Telnet.new("Host"=>"127.0.0.1", "Port"=>1234) -- Posted via http://www.ruby-forum.com/.