title: rsync through ssh tunnel
body: <p>I want to rsync to a cluster node to which I usually connect passing through another system: </p>
  
  <p>Say I connect first to </p>
  
  <pre><code>  ssh user@bridge 
  </code></pre>
  
  <p>and from there to </p>
  
  <pre><code>  ssh user@clusternode
  </code></pre>
  
  <p>Now I want to rsync from my workstation to clusternode. I do the following:</p>
  
  <ul>
  <li><p>I open a ssh tunnel </p>
  
  <pre><code>ssh -L8000:clusternode:8000 user@bridge
  </code></pre></li>
  <li><p>I rsync from my workstation to clusternode</p>
  
  <pre><code>rsync -e "ssh -p8000" source user@localhost:destination
  </code></pre></li>
  </ul>
  
  <p>and it does not work, I get </p>
  
  <pre><code> ssh_exchange_identification: Connection closed by remote host
  </code></pre>
  
  <p>Why does it not work? What do I have to do?</p>
  
  <hr>
  
  <p>I have found a lot of information here:</p>
  
  <p><a href="http://toddharris.net/blog/2005/10/23/rsyncing-through-an-ssh-tunnel/">http://toddharris.net/blog/2005/10/23/rsyncing-through-an-ssh-tunnel/</a></p>
  
  <p>I think to understand that my problem is the second authentication between the bridge and the destination, so I changed to method 2 that is also not very elegant, but it works. I would like to try method 3, but I don't know how to configure a rsync daemon</p>