Bypassing pesky SSH-blocking firewalls


I’m writing this on a bus with onboard Wi-Fi. The network works (and is decently fast!), but the provider blocks SSH for some reason, which means I can’t push my code to github without reconfiguring my remotes to use HTTP.
Fortunately, bypassing the firewall is fairly simple:

  1. Install your tools:
sudo apt install tor proxychains
# Disable tor service if you don't want to start it on boot
sudo systemctl disable tor

In my case the provider also blocked the default tor relays, so I had to obtain some bridges from bridges.torproject.org …which was also blocked, crap! So I used some seedy web proxy to access the site, and got myself some tor bridges.

  1. Add the bridges (if needed):
sudo su
echo 'Bridge <One of the lines you got from the torproject's site>' >> /etc/tor/torrc"
  1. Start tor:
# Run this in a separate terminal/tmux pane etc. as it needs to run in the background
tor
  1. Do your git thing:
    proxychains is already preconfigured to use tor, so you don’t need to do much here.
proxychains git push

Note that this should work for most other shell commands as well.