From: Bob Sinclair (bsinclair@netmasterclass.net)
Date: Thu Mar 04 2004 - 20:22:31 GMT-3
Adam,
Here is a scap from a simple telnet. Perhaps the prompt syntax you see here
will help:
use Net::Telnet ();
$t = new Net::Telnet (Timeout => 10,
Prompt => '/R2>\ $/');
$t->open("172.16.2.2");
$t->login(bob,password);
@lines = $t->cmd("sh ip int brief");
print @lines;
HTH,
Bob Sinclair
CCIE #10427, CISSP, MCSE
www.netmasterclass.net
----- Original Message -----
From: "Adam Asay" <aasay@cerberian.com>
To: <ccielab@groupstudy.com>
Sent: Thursday, March 04, 2004 7:10 PM
Subject: Off Topic Executing Commands with perl script
> Sorry for the off topic, but I haven't been able to find anything on this.
>
> I am using the perl module net::telnet:cisco to try and script some
managment
> tasks. Everything works great until I try and login to a router threw a
> terminal server.
>
> I get a "pattern match timed-out" error.
>
> Has anybody seen this, or can someone at lease point me in the right
direction
> on how to resolve it.
>
> Thanks
> Adam
>
> _______________________________________________________________________
> Please help support GroupStudy by purchasing your study materials from:
> http://shop.groupstudy.com
>
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Thu Apr 01 2004 - 08:15:14 GMT-3