Thread: Opening a telnet or SSH connection

  1. #1
    Registered User
    Join Date
    May 2006

    Opening a telnet or SSH connection

    I am looking for a way in C++ to open a telnet or ssh connection from a windows machine. I currently am using a very old and deprecated system for this inventory system at work. Unfortunatly I am stuck with the system, but would like to create a nice front end with c++ to make some things easier to do and add extra functionality.

    From a linux box I think I got the session open just using the system command but that of course doesnt work on windows. I can use telnet so I suppose system(telnet should work however I am also considering piping from my program into a Putty ssh client.

    Using the system() command to open a telnet, how would I actually send the commands? And if I use piping to work with the Putty client can I pipe commands to the client? Example: It is a text menu driven system and the first menu has 2 entries, 1) products 2) reports. So normally I would just hit "2 enter" to get to the next menu. Is it possible to pipe something like that? i.e. pipe << "2\n"; ?

  2. #2
    Registered User
    Join Date
    Apr 2007
    Wierd, this was posted almost a year ago with no replies ?
    I am also trying to learn how to telnet to a device, do a few things, telnet to another, so on...posted today 4/11/2007

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    > Wierd, this was posted almost a year ago with no replies
    Weird, yet another poster who hasn't read the forum rules.
    No wait, that's not weird at all, that's par for the course.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Socket communication hanging
    By zee in forum C Programming
    Replies: 15
    Last Post: 08-05-2004, 11:52 PM
  2. SSH connection
    By Thantos in forum Tech Board
    Replies: 3
    Last Post: 11-02-2003, 06:33 PM
  3. Headers that use each other
    By nickname_changed in forum C++ Programming
    Replies: 7
    Last Post: 10-03-2003, 04:25 AM
  4. telnet!!
    By bigB8210 in forum A Brief History of
    Replies: 1
    Last Post: 08-13-2003, 05:09 PM
  5. Most Secure (SSH) Telnet Client for Programming
    By kuphryn in forum A Brief History of
    Replies: 0
    Last Post: 02-14-2002, 08:49 PM