I\'ve got ~50 databases all set up at different host names, with the requirement that I connect to them through an SSH tunnel.
For example:
SSH ho
I created a tunnelto the DB using this command
ssh -L 10000:localhost:3306 user@ -N -f
-L is local host port it is user defined u can provide any port number
between 0 to 65535. 0 to 1023 are reserved.
whether you are using key based authentication to the server you should
mention the key like this.
ssh -i -L 10000:localhost:3306 user@ -N -f