title: Is there a way to scp between two aws instances from my local computer?
body: <p>I want to make a script to backup my files from the fileserver I have(EFS) to an S3 bucket. I want to run it from my computer and the problem is that I don´t know how to make this connection with a PEM File.</p>
  
  <p>I have found in the internet that i can use a scp command to to what I want.
  <a href="https://linuxacademy.com/blog/linux/ssh-and-scp-howto-tips-tricks/" rel="nofollow noreferrer">https://linuxacademy.com/blog/linux/ssh-and-scp-howto-tips-tricks/</a></p>
  
  <p>But I have to use my PEM file to connect and I can´t find out where it goes here.</p>
  
  <pre><code>scp -r yourusername@yourserver:/home/yourusername/examplefile yourusername2@yourserver2:/home/yourusername2/
  </code></pre>