PDA

View Full Version : Port forwarding + ssh tunnelling


ghell
03-24-2007, 05:23 PM
I need to work on a project from home (windows). It uses a mysql database server (linux). The server is on a machine that only accepts connections from within the network (so I could VPN in, but some places where I need to go don't let me connect to VPN)

I can ssh onto a general purpose server (linux) to tunnel the port but not to the database server. I obviously don't have root permissions on this server so there is a limited amount I can do.

Is there any way of me connecting to the mysql server from home without using VPN? At the moment the way I'm about to go about it is to quickly write a simple java port forwarder that I can run on the tunneled ssh connection so that the tunnel connects to the java on the general purpose server and the java connects to the mysql. If this is the only way to do it, is there a commonly used port forwarder I can use that doesn't require root permissions and isn't too big etc (I only have a smallish disk quota)?

FJbrian
03-27-2007, 03:14 AM
telnet?

ghell
03-27-2007, 06:18 PM
that doesn't answer my question in the slightest. However, I have since found the answer.

I just use putty to tunnel 3306 to databaseserver:3306 (this would be the -L flag on the command line SSH client) and then connect to localhost:3306