Afficher un message
Vieux 02/11/2006, 17h43   #2
rforman61@msn.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ADO.NET/Jet connection string using SSH tunnel


rforman61@msn.com wrote:
> I can't find any information about how to do what my boss wants me to
> figure out how to do using SSH tunnelling, wondering if anyone can
> or if anyone has done this specifically.


Here's some more specifics on what I want to happen and how I am going
about it so far.

I did figure out the answer to my own question about how you can
include an I.P address in the file path specification in the Jet
connection string, and saw that it does work. For instance, if I put
my database, let's call it test.mdb, on my local c:\ root folder, then
in my VB application, I can successfully connect to it by opening my
connection object with a Connection string including this segment:

Data Source="\\127.0.0.1\c$\smart.mdb";

.....the connection opens successfully. My understanding is that the c$
represents a file share on the c drive and can always be used.

.....Now, what I want to do is my VB app, is use a similar connection
string to open a database on the root folder of c:\ another machine on
the network. I can do this successfully without using an SSH tunnel,
by providing the real i.p. addresss of the remote
machine, same as above but using the local i.p. address of the other
machine instead of the "localhost" type i.p. address of 127.0.0.1.
That works fine too.

Now what I WANT to be able to do, connect to that remote database over
an SSH tunnel instead, so basically the idea was to be able to use
127.0.0.2 in the connection string and using the tunnel, have the
file-sharing (port 139, right?) on this machine forwarded to that on
the other end of the tunnel.....so that 127.0.0.2\c$ would get mapped
or forwarded or translated to the (shared) c:\ folder on the other
machine.

I am able to create and open the channel and then the tunnel. After
opening the channel in the Tectia GUI Client app, I then issued this
command in a DOS command window:

$ -sshg3 -L 139:127.0.0.2:139 xxx.xxx.x.xxx

where the x's are the i.p. adderss of the machine running the ssh
server. This works - after I issue the command, suddenly my command
window opens up to a folder on the remote machine, I can do dir$
commands and see the files over there in the command window, etc.

I guess this is where my understanding breaks down a bit, though.
Anyway, I then try to run my vb test app again, now I change the
connection string to say:

\\127.0.0.2\c$\Test.mdb....

thinking that I have port-forwarded messages coming to my local
127.0.0.2 port 139 (file sharing) over to the other machine, but anyway
it doesn't work, just tells me it can't find the file.

Should this work, am I close in my approach? I had read about a bug in
service pack 2 of Windows XP (which both computers are running under)
that prevented local i.p. addresses besides 127.0.0.1 from working, but
I have applied the Microsoft hot fix to both computers, and I think I
have an updated version of the file tcicp.sys, even later than that
which Microsoft lists in their knowledge base describing this patch, so
I don't think that's the problem.

!
Thanks.

richforman

  Réponse avec citation
 
Page generated in 0,07014 seconds with 9 queries