Use this for protected networks where port 22 isn't available, or for general security reasons where your traffic will be routed through an external server via SSH tunnel.
An EC2 micro instance or a tiny DigitalOcean droplet will work for this. For the initial configuration, access to port 22 is required, as you'll have to SSH onto your host.
In the host, edit /etc/ssh/sshd_config
and add the line Port 443
. Reboot. From now on you can SSH into the server through port 443 (ssh -p 443 user@server
).
Just run, in any terminal, ssh -vND 1080 -p 443 user@server
. This will start a SOCKS server on port 1080 of your machine.
You can now configure your system to use a SOCKS proxy on localhost:1080.
Git's doesn't use the system SOCKS settings, so we have to get fancy. Edit ~/.ssh/config
and add the following:
Host git.corp.example.com
ProxyCommand=nc -X 5 -x localhost:1080 %h %p
Where git.corp.example.com
is the server where your repo is located (eg: github.com
). This uses the netcat tool.