List:General Discussion« Previous MessageNext Message »
From:Daniel Walker Date:November 20 2005 9:00pm
Subject:Re: SSH tunnel for Mysql
View as plain text  
Well, off the top of my head, to achieve a local-forwarding, you'd do  
something like:

ssh user@stripped -L <arbitrary high port no>:localhost:3306 -N &

Remember, "localhost" is resolved after the tunnel is established, so  
refers, actually, to the remote machine :) (The -N option simply  
obviates the need to perform some useless execution at the remote  
end, like "sleep 9999" or somesuch nonesense).

An example:

ssh dwalker@stripped -L 3776:localhost:3306 -N &



On 20 Nov 2005, at 19:38, Rhino wrote:

> I use PuTTY (and WinSCP3) to attach my Windows machine to the Linux  
> server holding my MySQL database. PuTTY is used to get the command  
> line and WinSCP3 is the GUI I can use to do file transfers between  
> the two machines.
>
> In PuTTY, there is a place where you can create SSH tunnels; it is  
> located in the Connection/SSH/Tunnels page of the settings tree.  
> You just use the bottom half of the Port Forwarding section of that  
> screen to "add" new forwarded ports, specifying the source port,  
> the destination, and choosing one of local, remote, or dynamic;  
> then click Add and you should be ready to go.
>
> WinSCP3 also has an SSH section in its settings tree but I've never  
> touched the defaults or set up a tunnel for it and it works fine.
>
> Rhino
>
> ----- Original Message ----- From: "Jerry Swanson" <pmysql@stripped>
> To: <mysql@stripped>
> Sent: Sunday, November 20, 2005 10:00 AM
> Subject: SSH tunnel for Mysql
>
>
> How to create ssh tunnel for Mysql?
> TH
>
>
>
> ---------------------------------------------------------------------- 
> ----------
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.362 / Virus Database: 267.13.4/176 - Release Date:  
> 20/11/2005
>
>
>
> -- 
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.362 / Virus Database: 267.13.4/176 - Release Date:  
> 20/11/2005
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql? 
> unsub=daniel@stripped
>

Thread
SSH tunnel for MysqlJerry Swanson20 Nov
  • Re: SSH tunnel for MysqlLee Zelyck20 Nov
  • Re: SSH tunnel for MysqlRhino20 Nov
    • Re: SSH tunnel for MysqlDaniel Walker20 Nov
  • Re: SSH tunnel for MysqlGleb Paharenko21 Nov
    • Re: SSH tunnel for MysqlJerry Swanson21 Nov
      • Re: SSH tunnel for MysqlDan Bolser22 Nov
  • Re: SSH tunnel for MysqlKaram Chand8 Dec
    • Re: SSH tunnel for MysqlCal Evans8 Dec