Andries filmer

Feel free with Open Source Software

Andries Filmer - Internet professional sinds 1996.
Ik ben groot voorstander van Free- en Opensource Software (FOSS) en laat deze site jouw overtuigen waarom dit goed is.
Home Over deze website Kennisbank Ezelsoren Freelancer Online gereedschap

SSH over Tor

Index
  1. Introduction
  2. Install tor
  3. Install connect-proxy
  4. Running SSH through Tor
  5. Comments

Introduction

Sometimes we want a anonymous ssh connection and ssh is good for a secure network traffic but ssh does not hide your ipnr from whom it connects. Tor provides just such a capability.

Install tor

The anonymizing overlay network for TCP tool.

 apt-get install tor

Install connect-proxy

We need connect-proxy to establish a TCP connection using SOCKS4/5 or HTTP tunnel

 sudo apt-get install connect-proxy

Running SSH through Tor

To run SSH over Tor, run the following command. Substitute your username for andries and the IP address you wish to connect for 1.2.3.4 .

 ssh -l andries@1.2.3.4 -o ProxyCommand="/usr/bin/connect -4 -S localhost:9050 %h %p"

"-o" passes the following argument as option in the format used in the configuration file. In this case, it passes the option ProxyCommand with the value of "/usr/bin/connect -4 -S localhost:9050 %h %p". Port 9050 is the default portnumber for tor.

Additional options for ssh are covered in its man page. The "-4" option tells connect to use SOCKS protocol 4. The "-S" option specifies the hostname and port number of the SOCKS server to relay.

Do not pass a hostname instead of an IP address as the remote machine to which you wish to connect. If you pass a hostname, ssh uses your name server to resolve the name before passing it to connect. This deprives you of the protection of Tor for your name resolution. Instead use the program tor-resolve which is included with the Tor distribution. tor-resolve takes two arguments, the first is a fully qualified domain name (FDQN), the second is SOCKS proxy connection. The example below resolves www.google.com over the SOCKS proxy running on localhost over 9050 using Tor.

 tor-resolve www.google.com localhost:9050
 64.233.161.99

Resource: https://www.antagonism.org/anon/ssh-tor.shtml

This page is created on 2012-01-12 and updated on 2012-01-12

I appreciate if you give some comment about this page. Please go ahead.
Your e-mailaddress will not be published it is only to contact you (if needed).

 
Your name
Your e-mailaddress
To prefent robots to use this form I ask you kindly to type the next characters in the input field.
 

 


Mijn Curriculum vitae | De content op deze website heeft de Creativecommons 3.0 licentie | © 2011
Andries Filmer | http://andries.filmer.nl | andries@filmer.nl | © 2011
Deze website wordt gerealiseerd met Free- en Open Source Software: | | | | | |