title: How to transfer a file between two remote servers using scp from a third, local machine?
body: <p>I'm trying to copy a file from one <strong>remote</strong> server to <strong>another remote</strong> server from my <strong>local</strong> machine.
  Here's what I'm trying to do</p>
  
  <pre><code>localA $ scp userB@remoteB:/path/to/file userC@remoteC:/path
  </code></pre>
  
  <p>The problem is that I need to pass two passwords for both userB and userC on the remote machines. </p>
  
  <p>According to <a href="http://www.garron.me/en/articles/scp.html" rel="noreferrer">Garron</a> the above should work, but I got permission denied.</p>
  
  <pre><code>Permission denied (gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive).
  lost connection
  </code></pre>
  
  <p>Any suggestions?</p>