Wilson's Landing RSS

Archive

Sep
25th
Thu
permalink

How to tunnel insecure protocols using SSH over the internet

ssh username@host -N -L localport:127.0.0.1:remoteport

example

ssh ryan@wilson.com -N -L 80:127.0.0.1:81

In the above example i’m mapping port 80 on wilson.com to my local port 81. When I request a page from 127.0.0.1:81 it will be encrypted by the openSSL library on my machine and decrypted by wilson.com and forwarded to port 80 on wilson.com.


useful for accessing MYSQL hosts over the internet without opening port 3306 (a big no no)