PDA

View Full Version : telnet!!



bigB8210
08-11-2003, 01:50 PM
As part of my program I am required to telnet to a specified computer. I would need to telnet to the remote linux computer and execute a .sh(.bat) file.

I am accessing the dos remotely from a program, so I have no actual dos prompt appearing and I would need to telnet to a specified IP address and use a set of commands that are stored in a .txt file for use for use during the telnet session.

I have tried putting the following commnd in a .bat file:



telnet 192.168.1.4 < toDo.txt


but all I get is a Welcome to Microsoft Telnet Client garbage and none of the commands in the toDo.txt file are done on the remote machine.

As far as I know I may be in completely off the path here by using that command, so if you have anything better, or that you know that works please let me know.

All suggestion or solutions are greatly appreciated

Thanks

Hammer
08-13-2003, 05:09 PM
>>but all I get is a Welcome to Microsoft Telnet Client garbage
So you're not actually running DOS then, more a Windows Console.

The best way I see to do what you want, would be to write your open client software. Using beejs guide which I believe you've already read, this shouldn't be toooo difficult ;)