Thread: telnet!!

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    19

    telnet!!

    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:

    Code:
    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

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>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
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with telnet and tcp
    By hoAx in forum Windows Programming
    Replies: 11
    Last Post: 03-11-2008, 02:03 PM
  2. Opening a telnet or SSH connection
    By ac251404 in forum C++ Programming
    Replies: 2
    Last Post: 04-11-2007, 09:17 AM
  3. C Function Telnet Email
    By karcheee in forum C Programming
    Replies: 3
    Last Post: 07-25-2005, 11:39 AM
  4. C Execl Telnet
    By karcheee in forum C Programming
    Replies: 1
    Last Post: 04-26-2005, 02:31 PM
  5. Most Secure (SSH) Telnet Client for Programming
    By kuphryn in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 02-14-2002, 08:49 PM