Re: SSH Tunnel from Access - WeOnlyDo Discussion board

Re: SSH Tunnel from Access (General questions)

by richforman, Friday, September 29, 2006, 17:00 (6633 days ago) @ mrfurious

I can't say for sure, but I'm guessing that you will run into the same problem. The problem is that you need to establish the tunnel out-of-process and you can't do this if you're running the connection from within Access. One solution is to create an application that establishes the connection then opens access, or what we did is a shell to putty.exe passing necessary parameters to startup the ssh tunnel from a startup form.

I have to admit I don't quite understand all this. I am using two separate apps on my client side, one a variation on the weonlydo sample apps for SSHTunnel, that creates the tunnel, and that seems to work. I use the channels.add method as described in the various code samples to create the port-forwarding to the Windows file share, so now the remote machine should be forwarded to my client's machine file-sharing port 139 if I understand correctly. Then I am attempting to actually USE the tunnel in another application that I am writing in VB.NET using ADO.NET. My idea, and it should work according to my understanding, is to open an ADO.NET connection object using a connection string where the path to the database is specified using the path: \127.0.0.2c$pathdbname.mdb. But it always bombs on the open statement ( Disk or network error ) - it is a separate app, therefore a separate thread from the one that created the tunnel; so I don't see why it encounters the thread-blocking problem being talked about.

Question: has anybody, including you guys at weonlydo, done this exact thing - use a tunnel, port-forwarding, file-sharing, and ADO.NET to connect to a remote .mdb - and can point me towards the exact code that will make it work? If so and I can see it work my boss will purchase the product right away!

Thanks
Rich Forman
Cove Hill Group


Complete thread: