ypcat has asked for the wisdom of the Perl Monks concerning the following question:
command timed-out at ciscomailtester.pl
Please keep in mind I can run all other router commands and get the results I would expect, but when telneting out using the cmd() it gives the time out error. Note: The command does work if I do exactly what the script is doing.. i.e. telnet to my router login with the user and pass and then telnet to my mail server via the identical command. So this leads me to believe the problems lie's within Net::Telnet::Cisco. I also tried putting the command inside $mail->print('telnet 2.2.2.2 25');, however I did not have any luck this route either. Please let me know if you have any ideas.#!/usr/bin/perl use strict; use Net::Telnet::Cisco; my ($router, $mail, $line, $routeruser, $routerpass); $router = "1.1.1.1"; $routeruser="user"; $routerpass="pass"; $mail = Net::Telnet::Cisco->new(Host => "$router"); $mail->login("$routeruser", "$routerpass"); $mail->cmd('telnet 2.2.2.2 25'); $mail->close;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net Telnet Cisco Complications
by zengargoyle (Deacon) on Mar 19, 2002 at 06:13 UTC | |
by ypcat (Beadle) on Mar 19, 2002 at 18:34 UTC |