#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    5
    Rep Power
    0

    Starting a program, which starts another program


    Ok, the following problem has come to me, and i must say it's a bitch. I've searched a lot about it with google, on fora and on irc and haven't found a usefull thing about it.
    I'm making a program in C++ that should be able to use putty to connect to a ssh remote shell server, and in that window execute ftp to connect to a ftp server. Is there a way to send text to the putty window to be executed? I've already used: system(""), Console::Writeline("") and printf("") and it didn't work because system("") starts putty, but then will wait for putty to stop executing and after that the program will execute the rest of the code. Console::Writeline("") and printf("") won't work, as they just print text on the screen.
    I'm using windows XP and Visual Studio .Net
    If someone has found a way to work around this thing, i would be pleased to hear it.
    Greetz
    Pure4Real
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    793
    Can I ask why you are going through all this to connect to a ftp server?
    Can you not just ftp from the windows machine that will run the application? There are plenty of functions in the wininet.dll that allow for this.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    5
    Rep Power
    0
    Ah, yes, forgot to mention why i want this.
    The thing is, i want to fxp from the ssh server to the ftp server and the other way 'round, so i will need to do this, because i couldn't find a fxp program that has this option.
  6. #4
  7. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    793
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    5
    Rep Power
    0
    Hehe, tried that already, none of those programs will fxp, even if they say they do.
    I'm pretty sure I've tried them all :(
    But thnx for trying that one :)
  10. #6
  11. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    793
    I will admit that I am unsure about the windows side, but I know that sftp works on linux, as does scp. I use both, especially sftp which I use for sending edi to a server managed through ibm.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    5
    Rep Power
    0
    hmm, yes, i've tried winscp and it connects to the ssh server, so that's good, but it won't connect to a second server to do fxp.
    I cannot recall what sftp did for me, but i am really sure it didn't do the fxp part.
    Too bad i can't get my usb adsl modem running on linux cause else i would just be using linux all the time :D
  14. #8
  15. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    5
    Rep Power
    0
    But now my first question is still unanswered :(

IMN logo majestic logo threadwatch logo seochat tools logo