List:MySQL ODBC« Previous MessageNext Message »
From:David Carlson Date:March 12 1999 2:12am
Subject:RE: ODBC, mySQL and SSH
View as plain text  
Thanks Jeff - this works perfectly.

The SSH client I tried has no documentation, so it took a bit of tinkering.
For those of you interested, I have expanded on Jeff's directions for this
particular product. I'll assume you already have SSH host on your mySQL
machine, and have the appropriate passwords to log in via SSH.

1) install SSH client on your windows machine - I used a free SSH client
other useful links:

2) Start SSH. Set Host Name = yourmysqlserver name or IP address. Set
userid=your userid to log in to your server
3) click on "local forwards". Set
local port: 3306
host: localhost
remote port: 3306
4) save everything otherwise you'll have to redo it the next time
5) log in to your server with SSH
6) start Access
7) create a new file and link to mySQL using the ODBC driver the same way
you normally do except for server, user "localhost".

That's it. It works very well with a direct internet connection. I'm having
problems with SSH conflicting with my Win95 network and Wingate - but
that'll be the topic of a posting on another software company's usegroup!


-----Original Message-----
From: Jeff Oliver [mailto:jeff.oliver@stripped]
Sent: Thursday, March 11, 1999 12:05 PM
To: dcarlson@stripped; myodbc@stripped
Subject: Re: ODBC, mySQL and SSH

David Carlson wrote:

> Has anyone figured out how to get Access and ODBC to tunnel through to a
> Linux server via SSH? Do I need to make any changes to SSH server, or is
> all set up on the WIN95 client side?


If your ssh client supports port forwarding (most do), you should be able to
tunnel ODBC Traffic, though I'll admit that I haven't tried port forwarding
connections yet.   The basic idea is this:  in the ODBC configuration window
your MySQL datasource, there are options to choose the server and port.  For
server, enter "localhost" and for port leave it at the default (3306).  This
tells ODBC that when an application requests info via the MySQL datasource
have set up, connect to port 3306 on you local machine.

The next step is to set up your ssh client to listen on port 3306 of your
machine and to forward that connection to the server you're connected to.
is a bit tricky, and varies depending on your ssh client, so I'm not going
to be
much help here.  Please consult your ssh client's documentation on port
forwarding to learn how to do it right.  (I use SecureCRT for my ssh client.
It's a great product, but not free.  <>).  Once port
forwarding is set up to listen on localhost:3306 and tunnel to
yourmysqlserver:3306, you're all set.

Note that to tunnel the traffic through ssh, you must have an ssh connection
yourmysqlserver up and running before and throughout the course of your use
ODBC.  Lose your ssh connection, and you'll lose your ODBC connection too.

> Once I am able to do this, is the entire session encrypted, or just the
> login sequence & password?

Once you have authenticated to your server via ssh, any traffic you port
is encrypted, including your ODBC login sequence...

Hope this helps, let me know if you have trouble.


P.S.  I took a few minutes to test this on my NT machine (connecting to a
server on a Solaris box) and it does indeed work for me.  That's promising.

Jeff Oliver
Health Systems Analyst/Programmer
Vanderbilt Medical Center, Nashville TN, 37232-8340
(615) 936-1392

To request this thread, e-mail myodbc-thread11@stripped

To unsubscribe, e-mail the address in the List-Unsubscribe header.
For additional commands, e-mail: myodbc-help@stripped

ODBC, mySQL and SSHDavid Carlson11 Mar
  • Re: ODBC, mySQL and SSHJeff Oliver11 Mar
    • RE: ODBC, mySQL and SSHDavid Carlson12 Mar
    • Re: mysql & visual Java++ proHans Wolters31 Mar
  • Re: mysql & visual Java++ proADIB MOTIWALA31 Mar
Re: mysql & visual Java++ proRoger Cooper31 Mar
RE: mysql & visual Java++ proBrian Huddleston1 Apr