How do I use/enable Tor when using Terminal?

Running Tor provides a standard proxy you can connect to at localhost:9050 with anything that supports the SOCKS protocol. Just search online for something like "SSH over Tor", or if that fails, "SSH through SOCKS proxy".

Two examples:

  • SSH:

    ssh -o ProxyCommand="nc -X 4 -x localhost:9050 %h %p" example.com

  • curl:

    curl --socks4a localhost:9050 example.com