I often connect to an external server via ssh and setup a socks proxy on my machine and configure application to go through it.

I know very little about scripting but I assume it would be possible to do this with a script and save the script to the desktop.

The command I use is:

ssh -D 9999 username@sshserver.com -p ssh_port_on_server

Thanks Dan