If you're talking about a dynamic SSH tunnel to prevent local sniffing of your traffic, here's a quick-start I wrote a few months ago...
"To prevent sniffing of your data, you'll want to set up an encrypted "tunnel" to allow you to "sneak out" of an insecure network. This way, your traffic will be sent encrypted through the insecure network to a secure computer, which will access the rest of the internet by proxy for you. You'll use SSH (Secure Shell) to accomplish this.
First, you'll need an OpenSSH server at a secure location (your "house"). To get this for Windows, download it (
www.sshwindows.sourceforge.net), install it using all of the default options, then run the following commands at the Command Prompt (replace YOURUSERNAME with your actual Windows username obviously):
cd "C:\Program Files\OpenSSH\bin"
mkgroup -l >> ..\etc\group
mkpasswd -l -u YOURUSERNAME >> ..\etc\passwd
net start opensshd
Now that your SSH server at home is running, you'll need to know the IP address of your house computer or get a Dynamic DNS service from
www.dyndns.com.Now at your computer in the insecure network, download PuTTY (
http://www.chiark.greenend.org.uk/~sgtatham/putty/), an SSH client. This will be used to create your encrypted tunnel out of the insecure network. Open PuTTY, and under "Host Name (or IP Address)" type your house computer's IP address or DynDNS name. Under "Port" make sure it says 22. Now look on the left to Connection > SSH, and under "Preferred SSH Protocol Version" choose "2 only". Now under Connection > SSH > Tunnels type 1080 in "Source Port", click "Dynamic", and click "Add". Now go back to Session, and save your Session so you don't have to do all of that again. Now click Open, hit Yes about the fingerprint, login with the username that you used in the "mkpasswd" command above, type your password (it won't show the ****), and hit enter. Now minimize your PuTTY window but leave it running and logged on to your house computer.
Now still on your computer in the insecure network, open Firefox (
www.mozilla.com) and click Tools > Options > Connection Settings. Click "Manual Proxy Configuration", and under "SOCKS Host" type localhost and under "Port" type 1080. Make sure "SOCKS v5" is checked. Now click OK a few times. Now in the address bar type about:config , then type proxy under "Filter" then double-click network.proxy.socks_remote_dns to change it to "True". WHEEW!
Finally try to go to
www.google.com, and check
www.whatismyip.com which should say the IP address of your house computer.
To use this technique with other applications, just configure them to use a SOCKS v5 proxy server located at localhost on port 1080 while PuTTY is running and those communications can be encrypted too. Mozilla Thunderbird and GAIM support this, so you can have secure browsing, email, and chat while on an insecure network!"
Tell me if that gets you anywhere...