From: Brian Candler Date: 2009-02-26T22:16:46+09:00 Subject: Re: problem with ruby telnet really need help now plz Rayon Hunte wrote: >> def telnet >> begin >> t = Net::Telnet::new( "Host" => @host,"Timeout" => 50000000, >> "Telnetmode"=> true,"Waittime"=>2000,"Output_log"=> @outfile) >> t.puts @user >> t.puts @pass >> t.puts @cmd >> t.puts @cmd2 >> t.puts @cmd3 >> t.puts("logout") >> f = File.open(@outfile, "w") >> t.cmd("") >> t.write("bottom") >> f.close >> end You're still not doing this right. You're blatting a load of lines to the server, in the hope that it will accept them all, and logging out immediately in the hope that you will capture the data before it logs out. If you do it one line at a time - wait for prompt, send line, wait for prompt, send line etc - then you will be able to find out at which point it is failing. Also, try using the Dump_log option. This is like Output_log but it gives you a raw hex dump of data in both directions. -- Posted via http://www.ruby-forum.com/.