I use ProxyCap (http:/www.proxycap.com/). It will automatically create the ssh tunnel and will redirect my apps to this tunnel.