nv-l

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:

#!/bin/sh
# usage: cisco.sh < routers.lst
   
$vty_pass=john
$ena_pass=mary

while read TEMP
do
{
# 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
done                         

To run it, just create the routers.lst file that contains names (if
resolvable)
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
device
and issue specific commands. I'm not sure how to establish the telnet login
and
then pass the commands.


Brad Martin
MetLife





_________________________________________________________________________

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>