Terminal. SSH with Proxy Socks 4
You can use ProxyCommand option to ssh, which does exactly what you want in ssh_config:

Host target # or all
  ProxyCommand /usr/bin/nc -x IP:port %h %p


Or directly on command line:

ssh -o ProxyCommand='nc -x IP:port %h %p' user@host


The OSX netcat might have a bit different switches, but conceptually it works this way.

Credits: SuperUser question