Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Telnet Script 2

Status
Not open for further replies.

unable24

Technical User
Nov 15, 2001
13
US
I have a telnet script that works OK - 2 problems:

1) When it is done w/ the hostfile it keeps trying to telnet (to infinity).

2) How can I ensure that when it cannot log into a site (b/c site down), that it keeps going - and will create a list of the sites it could not reach???

See basic script:

#!/bin/sh
while read DOG
do
(
sleep 2
echo password
sleep 2
echo en
sleep 2
echo password
sleep 2
echo sho int
sleep 2
echo lo
echo " "
)|telnet $DOG
echo $DOG >> /users/john/miscfile.txt
sleep 1
clear
done < /users/john/hostdev.txt
fi
 
Don't know what the telnet script problem is, but (having seen this & your ping post ;-)) I'm guessing that you're trying to set up monitoring for several unix boxes ???

If this is so, then (rather than Re-inventing The Wheel (TM)) I'd recommend looking at Big Brother ( It does exactly what it says on the tin :)
One by one, the penguins steal my sanity.
 
Actually, need the telnet script to make config changes...
 
You're talking to a beginner here - what are rsh or ssh? Shells? Utilities?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top