Keep your SSH connections anonymous by using TOR
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@serverYou can use the usual ssh parameters:
torify ssh -X -p 2222 user@serverOf course, with torify you can use any other program like telnet, netcat etc.
ssh -o "ProxyCommand nc -X 5 -x 127.0.0.1:9050 %h %p" user@serverBefore using the tor connection, the tor service must be running:
/etc/init.d/tor startBecause 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 $6The 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...