SSH Over TorBrowser

SSH Over TorBrowser

SSH Over TorBrowser 1 The hotel in Thailand that I’m currently staying in is for some inexplicable reason blocking SSH, randomly. 6 hours ago it was working fine, but now when I need to do some work it’s decided to block me. At least that’s what I think is happening as all other requests work fine. I think it’s using some deep packet inspection too, as moving to another port also doesn’t work.

Anyway, the way round this is our friend, Tor. There are lots of ways to install Tor, but I like to have my Mac relatively clean of cruft, so I’ve opted for the TorBrowser bundle, which doesn’t come with any of the usual Tor utilities like proxychains, tsocks or torify.

Netcat is installed by default on a Mac though, and Netcat is the BOMB, and you can use it to proxy SSH over the Tor instance that comes with TorBrowser!

Provided TorBrowser is installed, running and connected, the following will let you proxy SSH over it:

[code]
ssh -o ProxyCommand=’nc -x 0:9150 %h %p’ example.com
[/code]

Please note that the TorBrowser port has changed from 9050 to 9150, if you’re running a really old version of Tor you should probably update anyway.

And you thought netcat was just for reverse shells!

Leave a Reply

Your email address will not be published. Required fields are marked *