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 sh script

Status
Not open for further replies.

alechko

Technical User
Jul 28, 2002
32
IL
How can I make a csh script that is doing a telnet with user and password but not terminating the telnet session?

I have the following:

#!/bin/sh
(sleep 1; echo "login\r"; sleep 1; echo "pass\r"; sleep 1) | telnet host

after entering the pass the session is terminated.

Any suggestions?
 
Telnet doesn't accept this type of connection. Look up expect in this and other unix fora. Apparently this offers this functionality (if I recall).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top