[nsp] Cisco commands automatically sent

Tim Franklin tim@colt.net
Fri, 9 Aug 2002 16:19:47 +0100


> I would like to know if it is possible to write a program on a
> Unix box where it could automatically run some commands on a
> cisco devices (7200 series and 3500XL) like:
>=20
> enable
> conf t
> int fa0/1
> shut
> end

Expect, if nothing else, will do what you want - you can essentially =
control the telnet session from within a script.  You can do much the =
same thing from Perl, Python, or some other scripting language of your =
choice - open a telnet connection to the box, log in and issue commands.

The danger is that your script will probably need to contain login =
information for the router, and in your example above the enable =
password.

Regards,
Tim.

--
Tim Franklin          ____________
Project Engineer      \C/\O/\L/\T/   EN&S -
T: +44 20 7863 5714    V  V  V  V  IP Services
F: +44 20 7863 5876