This ssh proxy connect utilty documentation explains how to connect with your ssh client to a ssh server, located on the internet from a local network protected by a firewall or NAT through a proxy(HTTPS for example). Then show you how to configure your ssh client to use the proxy when ssh client tries to connect to your ssh server.
Requirement are :
- Your firewall has to allow HTTPS connections through a proxy
- You need to have root access to the server where ssh is listening
- Install the connect software :
-
Get source and compiling:
$ cd /tmp/
$ git clone https://github.com/ShuminHuang/ssh-proxy.git
$ make
$ sudo cp connect /usr/local/bin/ ; chmod +x /usr/local/bin/connect
- Configure your ssh client.
-
Open or create your ~/.ssh/config file and add these lines :
Host my-ssh-server-host.net ProxyCommand connect -H proxy.free.fr:3128 %h 443
Host * ProxyCommand connect %h %p
- Configure the ssh server.
-
Edit this file (on debian system) /etc/ssh/sshd_config and add this line :
Port 443
Then restart the daemon :
sudo /etc/init.d/ssh restart
$ ssh my-ssh-server-host.net
For example to connect to in ssh github.com :
Host github.com ProxyCommand=ssh my-ssh-server-host.net "/bin/nc -w1 %h %p"
- [SSH through HTTP proxy] zeitoun.net
- [Bypass Any Firewall] SaulChristie
- [ProxyTunnel: punching holes in HTTP(S) proxy] proxytunnel
- [OpenSSH proxy command for socket connection using SOCKS4/5 or HTTP tunnel] gotoh