mysql tunnel
$ ssh -L 3306:127.0.0.1:3306 user@example.org
testing
$ mysql -h 127.0.0.1 -uroot -p test
ssh -D 1080 <遠程主機地址> or ssh -D 7070 <遠程主機地址>
I prefer 1080 to 7070. the reason is 1080 default for SOCKS port.
ssh neo@www.example.com -D 1080
ssh -D 1080 -f -C -q -N neo@example.com
Explanation of arguments
-D: Tells SSH that we want a SOCKS tunnel on the specified port number (you can choose a number between 1025-65536)
-f: Forks the process to the background
-C: Compresses the data before sending it
-q: Uses quiet mode
-N: Tells SSH that no command will be sent once the tunnel is up