C++/Telnet/Linux

This is a discussion on C++/Telnet/Linux within the C++ Programming forums, part of the General Programming Boards category; Good day, I will be creating a telnet application in C++ to be deployed in Linux. I created POC about ...

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    1

    C++/Telnet/Linux

    Good day,

    I will be creating a telnet application in C++ to be deployed in Linux. I created POC about it if it is possible in C++. The reason why I needed to create a telnet application is because I will be connecting to a server, run some commands there and get all the files generated by the commands.

    I tried running it using system() to no avail. For some reason I could not read/get the output of the telnet so that I can input my username and password. If anyone has any idea on how to do this please help.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Have you tried using ssh instead?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Use this: dudeomanodude's Avatar
    Join Date
    Jan 2008
    Location
    Hampton, VA
    Posts
    391
    You'll need to use some shell scripting to get it to work. Off the top of my head you'll need to use linux pipes and then fork() and exec() your program.
    Ubuntu Desktop
    GCC/G++
    Geany (for quick projects)
    Anjuta (for larger things)

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21