From: Rayon Hunte Date: 2009-02-26T10:37:15+09:00 Subject: Re: problem with ruby telnet really need help now plz Julian Leviston wrote: > Can you connect normally? > > Blog: http://random8.zenunit.com/ > Learn rails: http://sensei.zenunit.com/ yes i can and catpute the file using cross talk. i am trying to automate that process here is the modifed code still faling btw # To change this template, choose Tools | Templates # and open the template in the editor. require "rubygems" require "net/telnet" #================================ class Telnet attr_accessor :host , :user ,:pass , :cmd ,:cmd2 ,:cmd3,:outfile,:ex def initialize end 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 rescue StandardError => @ex puts @ex ensure t.puts("logout") end end the error message An established connection was aborted by the software in your host machine. c:/ruby/lib/ruby/1.8/net/telnet.rb:601:in `syswrite': An established connection was aborted by the software in your host machine. (Errno::ECONNABORTED) from c:/ruby/lib/ruby/1.8/net/telnet.rb:601:in `write' from c:/ruby/lib/ruby/1.8/net/telnet.rb:625:in `print' from c:/ruby/lib/ruby/1.8/net/telnet.rb:634:in `puts' from C:\Documents and Settings\rhunte\Desktop\telnetmonster\lib/telnet.rb:34:in `telnet' from C:/Documents and Settings/rhunte/Desktop/telnetmonster/lib/main.rb:51 -- Posted via http://www.ruby-forum.com/.