RE: Telnet Question

2000-05-19 08:50:46
Subject: RE: Telnet Question
From: Sean Davidson <sean.davidson AT mail.publix DOT com>
To: nv-l AT lists.tivoli DOT com
Date: Fri, 19 May 2000 08:50:46 -0400
Here's the cheap/easy way, just use Korn shell script. Here's sample:

# usage: cisco.sh < routers.lst

while read TEMP
# Get enable mode on router(s)
        echo $vty_pass
          echo enable
          echo $ena_pass                                
# Set terminal length to 0 (no hold)    
        echo term len 0

# Issue command
        echo show arp
# Logoff router
        echo quit
#  Wait for completion of script
        sleep 30
} | telnet $TEMP

To run it, just create the routers.lst file that contains names (if
or ip addresses of routers (one per line) you want to issue the command on.
Output will go to screen. You can redirect to a file if you want.

-----Original Message-----
From: Brad Martin [mailto:bmartin AT metlife DOT com]
Sent: Wednesday, May 17, 2000 3:27 PM
To: nv-l AT tkg DOT com
Subject: [NV-L] Telnet Question

How can I perform non-interactive telnet session from a script that runs
from an
AIX machine? I would like to write a script that will telnet to a Cisco
and issue specific commands. I'm not sure how to establish the telnet login
then pass the commands.

Brad Martin


NV-L List information (unsubscribing, policies, posting, digest version,
searchable archives): http://www.tkg.com/nv-l

<Prev in Thread] Current Thread [Next in Thread>