plink intialized from my app dosnt seem to work...

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I have a app that connects to MySQL database server. I want to support
SSH port forwarding for security reasons. For this I am using PLINK to
initialize a SSH tunnel session.

I am calling up PLINK from my app using CreateProcess() in the
follwoing way:

char appname[] = "\"c:\temp\plink.exe\" -l user -pw pwd -L
3307: -P 22 localhost";


si.cb = sizeof( si );
si.wShowWindow = SW_SHOW;

prret = CreateProcess ( NULL, appname, NULL, NULL, FALSE, NULL, NULL,
NULL, &si, pi  );

pi is passed as a parameter to the function.

After the createprocess statement the console window comes up and I
know it has successfully created a session.

But whatever I do, I cant connect to the MySQL server on port 3307
which it should?

The best part is that if I run plink cmd.exe with the same exact
parameter, I am able to connect to port 3307. Do I need to do
something special to start off plink correctly from my app.

I have searched the groups and everybody seems to have use this
without any problem except me :(

What I am doing wrong?

Please help as my project is kinda stuck without it...


Site Timeline