Telnet - login

A

Adgar Marks

Dear all,

i used one of the simples examples to open a telnet connection,
#Begin Ruby code

#!/usr/bin/ruby
require 'net/telnet'

remote = Net::Telnet::new( "Host" => "192.168.80.1",
"Port" => "23",
"Timeout" => 60,
"Output_log" => "output_log",
"Dump_log" => "dump_log"
)

remote.login( {"a","xxxxxx") {|c| print c}
puts ">>>LOGIN COMPLETE"

remote.cmd( "print,/" ) { |c| print c }
remote.close
#End Ruby code

Here is what i get:

# GB1000 receiver ready
# /par/rcv={id=8QT5CSWNSHS,ver={main="3.1 Jun,28,2007
p3",board=EGGDT_2}}
login: Password: RE019%Logged in on /dev/tcp/a%
/usr/lib64/ruby/1.8/net/telnet.rb:551:in `waitfor': timed out while
waiting for more data (Timeout::Error)
from /usr/lib64/ruby/1.8/net/telnet.rb:685:in `cmd'
from /usr/lib64/ruby/1.8/net/telnet.rb:730:in `login'
from telnet.rb:11

from the receiver i am already loged in, then why do i still get this
login error?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top