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. Right now I have the Tectia
SSH Server running on a machine on our local network - on that machine
also sits an Access database (.mdb) that I want to connect to for this
exercise. I also have the Tectia SSH Client installed on my own pc
here on the network. I can create a tunnel, or at least an ssh
"channel," using Tectia's GUI Client application just by selecting
"Quick Connect" and entering the IP address of the machine running the
SSH server, and accepting the default port of 22.
What I want to then do on the client machine, is to have a
VB.NET
application connect to and manipulate the Access database on the
"server," using an ADO.NET connection string that somehow uses the
tunnel to specify the location of the database it wants to connect to.
I THINK (you'll have to forgive me for not even being exactly sure of
what I am trying to do!) that I want to be able to include a "local"
i.p. address like 127.0.0.2 in the connection string (my boss tells me
you can use an i.p. address as part of the file specification in the
Jet connection string, I'm not even sure exactly the syntax of doing
that), and use port-forwarding to have the connection request actually
go to the remote (server) machine's file system (where I have the .mdb
sitting on the root of c to simplify things somewhat). I believe the
technique is to use the C$ file-sharing syntax to refer to the root of
C:\ on the target machine, and I think what I need to do is involve
port 39 on both machines in order to have the local 127.0.0.2 translate
or forward to the remote machine's ip address.
I know I will use the sshg3 command (which I understand is Tectia's
implementation of the more generic ssh command that would otherwise be
used) to turn on the port-forwarding tunnel once the channel is opened,
and I understand in a kind of an abstract way that in that command I
will specify the source and target I.P.'s and ports between which the
tunnel will be created. But I'm stuck on exactly how to build the
command, and how I will then construct my connection string to use the
tunnel.
I feel confident that this can be done and probably fairly simply but I
can't find any specific instructions on how to accomplish this task.
Has anyone reading ever tried a similar use of an SSH tunnel that can
offer any ? I am very experienced and comfortable with
VB.NET
programming using ADO.NET, the Jet provider, connection string, etc;
all I need with is setting up the port-forwarding tunnel the way
it should be and then constructing the file-path specification in the
connection string.
Thanks,
richforman