2011
04.15

Here is a simple way to use Mac OS X Terminal’s ssh command over Tor. This was tested with Mac OS X 10.6.7 (Snow Leopard) but, don’t worry, I’m almost positive it’ll work with any recent version of OS X.

I am assuming you already have Tor installed and running. This could be by means TorButton, hand-rolled install, whatever.

Run the following command from terminal:

ssh -o ProxyCommand="nc -X 4 -x localhost:9050 %h %p" example.com
Where example.com is the remote host you wish to connect to. To save your self the trouble, quickly run this alias command:

alias tor-ssh='ssh -o ProxyCommand="nc -X 4 -x localhost:9050 %h %p"'
Now you can use the command tor-ssh as if it were ssh!

tor-ssh username@host.com 22