SPUG: DB connection via SSH tunneling

Ken Clarke kenslinux at shaw.ca
Thu Sep 25 16:48:12 CDT 2003


Hi Folks,

    Does anyone on the list have experience connecting to a remote database
through an SSH tunnel?  Here's the problem I've been handed:
    Write a series of CGI scripts for use on a publicly hosted (third party
ISP) website which are capable of retrieving data from an MS SQL server
running on a private, internal LAN.

    I feel that an SSH tunnel is the idea answer since it provides host
authentication (the request comes from client's web host), user
authentication (it's one of my scripts) and data encryption (protects the
database access parameters and other advantages).

    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?

    Any input or alternative suggestions are greatly appreciated.




More information about the spug-list mailing list