[TriLUG] seeking ssh tunnel advice

Alan Porter porter at trilug.org
Sat Jan 12 03:35:19 EST 2008


 > $ ssh -fNL 3306:192.168.0.12:3306 os2 at netgear.dyndns.org &
 > $ mysqladmin -h netgear.dyndns.org -u mysql2 version

The ssh command forwards port 3306 ON YOUR LOCAL MACHINE to
the netgear router and then on to box2 (because of the netgear
port forward).  On box2, the sshd forwards the traffic to
port 3306 on 192.168.0.12 (also box 2).

So this means you need to do something like this to connect
to the database:

$ mysqladmin -h localhost -u mysql2 version

Alan




.





More information about the TriLUG mailing list