This article explains how to connect to a ssh server located on the internet from a local network protected by a firewall through a HTTPS proxy.
Requirement are :
The ssh daemon need to listen on 443 port. To accomplish this, just edit this file (on debian system)
/etc/ssh/sshd_config and add this line :
Then restart the daemon :
sudo /etc/init.d/ssh restart
I suppose you are on a Linux system (debian for example). First you have to compile the connect binary which will help your ssh client to use proxies (HTTPS in our case). Then you have to configure your ssh client to tell him to use HTTPS proxy when he tries to connect to your ssh server.
sudo apt-get install connect-proxy
cd /tmp/ wget http://www.meadowy.org/~gotoh/ssh/connect.c gcc connect.c -o connect sudo cp connect /usr/local/bin/ ; chmod +x /usr/local/bin/connect
~/.ssh/configfile and add these lines :
## Outside of the firewall, with HTTPS proxy Host my-ssh-server-host.net ProxyCommand connect -H proxy.free.fr:3128 %h 443 ## Inside the firewall (do not use proxy) Host * ProxyCommand connect %h %p
For example to connect to in ssh
Host github.com ProxyCommand=ssh my-ssh-server-host.net "/bin/nc -w1 %h %p"