About Net::telnet

I use Net::telnet connecting my router,rename hosname,show current
users,but I got an error.
My code below:

require ‘net/telnet’

tn = Net::Telnet.new({‘Host’=> ‘3333::1’, ‘Waittime’=> ‘100’})
sleep 1
tn.cmd(“config\r\nhostname TEST\r”) {|c| puts c}
sleep 1
tn.cmd(“show user”) {|c| puts c}
sleep 1

but I got an error as the attachment,I don`t konw how to fix this
error.Pls help me.Thx~~~

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs