Connect with SSH through a proxy

ssh <user>@<host> -o "ProxyCommand=nc -X <type> -x <proxy_host>:<proxy_port> %h %p"

with <type>:

  • 5 = socks 5
  • 4 = socks 4
  • connect = http

needs netcat.