in reply to Re^5: Telnet File Handle isn't open on login
in thread Telnet File Handle isn't open on login
The above error message IS in Net::Telnet so that makes sense. However, when I run your script against a Cisco router (assuming Cisco based on the commands in your script) it works fine.
I ran it with Net::Telnet versions 3.03 and 3.04 and against a router with Password only and User/Password prompts. Each of the 4 iterations produced the startup config printed to my screen.
If you are connecting to a Cisco device, have a look at Net::Telnet::Cisco as that does the "heavy lifting" for you (waitfor, prompts, etc.) and makes connecting and issuing commands much easier.
In fact, for a script using N::T::C that works, have a look at:
Script: http://www.vinsworld.com/software/crapps.zipPerldoc: http://www.vinsworld.com/software/crapps.html
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: Telnet File Handle isn't open on login
by jbev2328 (Novice) on Sep 27, 2013 at 21:55 UTC | |
by VinsWorldcom (Prior) on Sep 28, 2013 at 00:42 UTC |
In Section
Seekers of Perl Wisdom