I often want to access my office's intranet and Samba fileserver while at home. There's a firewall in the way of course. However SSH from my static DSL IP is allowed, so the solution is to forward local ports on the Mac to a box with sshd inside the firewall.
For example if you want to access an internal intranet, connect to an internal proxy from your office desktop via an ssh connection:
% ssh -N -L 8888:proxy.xyz.com:3128 \What is going on here is connections to your Mac's localhost port 8888 are tunneled to your office machine, which then forwards it to the office web proxy that is listening on port 3128. Then set your browser's proxy to localhost port 8888 and start browsing!
my.office.desktop.xyz.com
% sudo ssh -v -l username -i ~username/.ssh/identity -N -L \The go to Finder -> Go -> Connect to Server -> Address, and input the folder you want, ie smb://localhost/Docs.
139:samba.xyz.com:139 my.office.desktop.xyz.com
Mac OS X Hints
http://hints.macworld.com/article.php?story=2002090906522942