title: Transfer a large file/directory with SFTP via an intermediate SSH server
body: <p>I want to transfer some data from another site. They have a SSH server through which I connect to that site.
  Once connected, I use a SFTP command to an internal machine (which I cannot access directly from my machine) and get the data.</p>
  
  <p>I now want to transfer a large bz2 file.</p>
  
  <p>The problem is the SSH machine I use (to connect to the data) can ONLY hold around 50GB.</p>
  
  <p>So this is what I do normally (below) but now I want to do it for transferring ALL the subfolders in this bz2 file VIA the SSH machine.</p>
  
  <p>Current steps as follows:</p>
  
  <pre><code>ssh george@ssh.abc.com
  
  sftp george@bigserver.abc.com
  
  cd /temp/george
  
  get file.txt
  
  bye
  exit
  </code></pre>
  
  <p>Now from my local machine: </p>
  
  <pre><code>sftp george@ssh.abc.com
  get file.txt
  bye
  </code></pre>
  
  <p>I also have a UNZIPPD folder in my data file if that helps.</p>
  
  <p>What I want to do:</p>
  
  <p>1) I want to transfer the whole folder to my local machine via the SSH server but as I mentioned the SSH server can only hold 50GB at a time.
  I also want to do it that I can start it and not have to do it manually, file by file (like now).</p>
  
  <p>2) Also don't want to lose the SSH/SFTP connection half way.</p>
  
  <p>Any suggestions on scripts I could use would be much appreciated.</p>