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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

shell script to telnet

Status
Not open for further replies.

AQWQ

Programmer
Aug 5, 2001
33
IN
Is it possiblt to telnet to a machine using a shell script???

Thanx Santhosh Ravindran
 
Hi Santhosh,

Yes, it is. You do need to use a utility such as 'expect' or the Perl Telnet module. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Ive written a shell script that telnets for me: Basically theres about 300 sites that I may need to dial in to, so rather than have a list of there IP address I run a program that lets me telnet using the site name instead.Its called "net" and the context would be at a hash:

net port

The program would search its Database for the string "port" bring back the mataches, you would select which one and the it would telnet to the server for you.(after a ping response from the router and server)

Anyway back to your question, within the shell script surely you would just add "telnet ip_num" or do you want it to add the password for you?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top