SPUG: Re: DB connection via SSH tunneling
jmates at sial.org
Thu Sep 25 17:14:32 CDT 2003
* Ken Clarke <kenslinux at shaw.ca>
> Here's what I have in mind. They can run Vandyke's VShell behind their
> corporate firewall. VShell can be configured to provide ODBC
> connectivity to any system DSN on the internal LAN. I can create an
> SSH connection using Net::SSH::Perl but this is as far as I get. I
> have the ODBC connection in my left hand and DBI's methods in the
> right hand. How do I bring the two together?
Port forwarding, perhaps? The 5333 is the (random, honest!) port to bind
to on 127.0.0.1 on your system, and the ???? should be replaced with the
port ODBC listens on.
my $ssh = Net::SSH::Perl->new("host", options => [
"LocalForward 5333 internalodbchostname:????"
Once the SSH connection is made, in theory you should be able to connect
to 127.0.0.1:5333 and be automagically connected to the internal host.
More information about the spug-list