June 27th, 2003, 03:45 PM
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.
June 27th, 2003, 04:11 PM
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.
June 27th, 2003, 04:14 PM
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.
June 27th, 2003, 04:28 PM
June 27th, 2003, 04:30 PM
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 :)
June 27th, 2003, 04:33 PM
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.
June 27th, 2003, 04:36 PM
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
June 28th, 2003, 02:57 PM
But now my first question is still unanswered :(