title: Using scp to copy a file to Amazon EC2 instance?
body: <p>I am trying to use my Mac Terminal to scp a file from Downloads (phpMyAdmin I downloaded online) to my Amazon EC2 instance. </p>
  
  <p>The command I used was:</p>
  
  <pre><code>scp -i myAmazonKey.pem phpMyAdmin-3.4.5-all-languages.tar.gz  hk22@mec2-50-17-16-67.compute-1.amazonaws.com:~/.
  </code></pre>
  
  <p>The error I got: 
  <strong>Warning: Identity file myAmazonKey.pem not accessible: No such file or directory.
  Permission denied (publickey).
  lost connection</strong></p>
  
  <p>Both my myAmazonkey.pem and phpMyAdmin-3.4.5-all-languages.tar.gz are in Downloads, so then I tried </p>
  
  <pre><code>scp -i /Users/Hello_Kitty22/Downloads/myAmazonKey.pem /Users/Hello_Kitty22/Downloads/phpMyAdmin-3.4.5-all-languages.tar.gz  hk22@mec2-50-17-16-67.compute-1.amazonaws.com:~/.
  </code></pre>
  
  <p>and the error I got:
  <strong>Warning: Identity file /User/Hello_Kitty22/Downloads/myAmazonkey.pem not accessible: No such file or directory.
  Permission denied (publickey).
  lost connection</strong></p>
  
  <p>Can anyone please tell me how to fix my problem?</p>
  
  <p>p.s. there is a similar post: <a href="https://stackoverflow.com/questions/6558080/scp-secure-copy-to-ec2-instance-without-password">scp (secure copy) to ec2 instance without password</a>
  but it doesn't answer my question. </p>