OpenSSH is a great means to protect your connection from being sniffed by others. However, this isn’t always enough. Simply proving that you connected to a server is enough to get incriminated. Unfortunately, SSH doesn’t provide a native way to obfuscate to whom it connects. Instead, a proxy server can be set up. And this is where TOR comes to play.
For Install and configure Tor in your system follow my previos post Anonymous Scanning with Tor
If you want to use TOR with OpenSSH, you have to install another program called connect-proxy.
#apt-get install -y connect-proxy
Setup OpenSSH to use TOR for all connections
Add the following block to the top of your ~/.ssh/config file.
#vi ~/.ssh/config
Host *
CheckHostIP no
Compression yes
Protocol 2
ProxyCommand connect -4 -S localhost:9050 $(tor-resolve %h localhost:9050) %p
:wq!
If you are too lazy to workout try this simple thing to anonymous login in any application yoy want.
#torify ssh user@ip_address and that’s it.
With this tool you can torify any application you want, wget, telnet, ftp…
It is very simple to anonymize your SSH sessions. I’ve written this tutorial for legal purposes only. Using this is your own risk.