title: Copy file with rsync or scp over multiple level or hops of SSH
body: <p>I need to transfer around 4.2 GB of files from my <code>local computer</code> to a <code>server B</code>. However to ssh into server B, I need to ssh into <code>server A</code>.</p>
  
  <p>Currently I'm copying files from my <code>local computer</code> to server A and then from <code>server A</code> to <code>server B</code>. </p>
  
  <p>So the flow goes like this:</p>
  
  <p><code>rsync -avz --del ~/Desktop/abc/ &lt;my-user-name&gt;@&lt;server-A&gt;:~/abc</code></p>
  
  <p><code>rsync -avz --del ~/Desktop/abc/ &lt;my-user-name&gt;@&lt;server-B&gt;:~/abc</code></p>
  
  <p>This is slow and copies 4.2 gb of data two times instead of one! </p>
  
  <p>Can I transfer files with <code>rsync</code> from my local computer to directly <code>server B</code> ? </p>