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

5 comments so far

Add Your Comment
  1. cool, it works just as expected (safe and slow :-) )

  2. 100 Days of Real Food: a full 7 days of breakfast, lunch, dinner and snacks! I wish this was a subscription plan but it

  3. God bless you, its working!

  4. Be careful… it leaks DNS lookups!

  5. what if tor is running on the remote machine your trying to connect to?