Check the docs for the ssh ProxyCommand
option. You can specify a command to run (for example, nc) to connect to a given host and port. For example, adding this to your .ssh/config might work to traverse a SOCKS5 proxy:
ProxyCommand nc -x MY_PROXY_HOST:MY_PROXY_PORT %h %p
More detailed instructions are going to depend on your environment.