SSH through HTTPS proxy

connect-proxy is a simple relaying command to make tunnel TCP connection via SOCKS4/5 or HTTPS proxies. It is mainly intended to be used as proxy command for OpenSSH. To use it first install the appropriate package, connect-proxy on GNU/Debian.

Then adjust your ssh configuration:

# vi ~/.ssh/config 
Host 10.10.1?.* 10.10.2?.* 10.10.3?.* *.foobar.fr
   User root
   ProxyCommand connect-proxy -H 10.2.0.217:3128 %h %p

Here in order to reach these specific hosts we connect through an HTTPS proxy on the port 3128 of the machine 10.2.0.217 Note that you can also use other program, like corkscrew instead of connect-proxy.