Secret Socks is a (free and open source) little program that does all this for you. Just type in your account password and click Connect. It automatically updates your network settings, and will change it back automatically after you disconnect.
And if that's not good enough, it comes packaged with a cutting-edge SSH client (obfuscated-openssh) that defeats deep packet inspection. Your SOCKS proxy will be kept secret from programs looking out for encrypted connections. Just something extra in case your boss/government is trying to block SSH connections. Of course, your SSH server will also need to support obfuscated-openssh for that to work. Otherwise, just use regular SSH. I've only tested this on Leopard.

