This is what I’m running from commandline:
ssh -L 1110:mail.rejon.org:110 -L 1143:mail.ctyme.com:143 -L 1125:mail.rejon.org:25 USERNAME@rejon.org
Then, all I do is change the places where normally I would put mail.rejon.org, mail.ctyme.com, etc, and replace the USERNAME and @rejon.org with your own server and hostname (possibly your web hosting provider) with:
localhost:corresponding_new_port
So, mail.rejon.org would become:
localhost:1125
So, this works for securing your email through SSH Tunneling.
Mac users, here is an app you can use to make this point-and-click.
Have fun and remember to use this when traveling abroad in places that won’t let you get your favorite WWW encyclopedia or CC.org email, for example.




Also, you can use ssh over httptunnel (hts, htc) if you are trying to pass through a HTTP proxy.
Other, potentially easier options if you don’t want to change the ports used by various applications:
* ssh -D 1080 you@friendly.host.org , and use SOCKS, such as by running tsocks yourmailclient or tsocks yourbrowser
* Use the new SSH tun-based VPN support.
nice find on that SSH Tunnel Manager.app. I’ve been toying around wiht tunnels on OSX lately, and resorting to Terminal for the pleasure. This will come in handy for coffeeshop jaunts, airports, and the like.
In case of http and a virtual host, you can’t simply change the url in the browser to localhost because that would change the Host header too. Instead, you can add the server name to /etc/hosts with IP address 127.0.0.1. If the server has virtual hosts based on the port number, I don’t know what to do.