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!

Telnet piping woes

Status
Not open for further replies.

SunnyByfleet

Technical User
Feb 24, 2003
146
GB
Hi,

I am trying to automate some telnet sessions.

For instance, rather than typing:

telnet 192.168.1.1
admin // (when asked for username)
admin // (when asked for password)
help /? // (Just something to do)

I want the key strokes in a file so I can pipe it into the telnet session.

I have the keystrokes in a file called tempfile

I have tried the following:

type tempfile | telnet 192.168.1.1

I have also tried:

telnet 192.168.1.1 < tempfile

In both cases, I get the following:

Welcome to Microsoft Telnet Client

Escape Character is 'CTRL+]'

Anybody have any idea how I can get this working?

 
Code:
ftp -s:filename
Redirects and pipes won't work, you must use the ftp client's switch.

"We must fall back upon the old axiom that when all other contingencies fail, whatever remains, however improbable, must be the truth." - Sherlock Holmes

 
D'oh! Nevermind, I've got ftp on the brain this morning.

"We must fall back upon the old axiom that when all other contingencies fail, whatever remains, however improbable, must be the truth." - Sherlock Holmes

 
Thanks for the suggestions. I actually found a solution using VB and Winsock in the end. Winsock is fun!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top