Linux Horizon

Keep your SSH connections anonymous by using TOR

Hacker Emblem

OK, let's cut the bullshit!
We like security, we like confidentiality! Why? Because we love anonymity.
And what's the best tool for that? Of course, it's Tor Project.
I will not waist your time about the Tor browser (a superb tool that keep your Internet connection under the radar) because on the maintainer page are tones of useful documentation.

So, what's all about? Right! It's about anonymization of SSH connection using tor provided tools.

For Linux follow the official installation guide: https://www.torproject.org/docs/debian
For other operating systems, my strongly recommendation is to switch to Linux distro... That's the shiny way! :) Kidding... Kidding??? No, no kidding at all! :D

So, after tor installation you have two ways to use your ssh over it.

1. First way, the simplest one, is by using "torify" (torify is a wrapper around torsocks and is one of the tor packet suite)

torify ssh user@server
You can use the usual ssh parameters:
torify ssh -X -p 2222 user@server
Of course, with torify you can use any other program like telnet, netcat etc.

2. The second way, and the one we like most is passing the tor proxy arguments directly as ssh parameters (netcat should be previously installed)
ssh -o "ProxyCommand nc -X 5 -x 127.0.0.1:9050 %h %p" user@server
Before using the tor connection, the tor service must be running:
/etc/init.d/tor start
Because sometime I'm lazy, I made a script (ssh-tor) in /usr/local/bin to use the second way:
#!/bin/bash
ssh -o "ProxyCommand nc -X 5 -x 127.0.0.1:9050 %h %p" $1 $2 $3 $4 $5 $6
The script as is, it accept six extra parameters (ssh-tor -X -p 2222 user@server, where "-X", "-p", "2222" and "user@server" are four parameters), if you need more make the proper adjustments...

So, be glad about your freedom! :)

If you need additional infos or Q&A please go to Contact Page for our e-mail addresses...

LiNUX Horizon it is a NetXpert Partner

LiNUX Horizon Main Page | LiNUX Horizon Online Shop | LiNUX Horizon Forum


No Banana Union - No Software Patents Say NO to software patents!

Valid XHTML 1.0! Valid CSS! Viewable With Any Browser