title: Can't open .pem file in keychain access
body: <p>So I'm trying to set up an EC2 instance on AWS and I've created a key pair and downloaded the .pem file. However, when I try to open it I get the error message:</p>
  
  <p><img src="https://i.stack.imgur.com/zPfip.png" alt="Keychain error message"></p>
  
  <p>I've also read about entering the following in the terminal to work around the issue:</p>
  
  <pre><code>security import pub_key.pem -k ~/Library/Keychains/login.keychain
  </code></pre>
  
  <p>but this doesn't work either (I get the following error message:</p>
  
  <blockquote>
    <p>security: Error reading infile pub_key.pem: No such file or directory). </p>
  </blockquote>
  
  <p>I've also tried just creating new key pairs but the problem persists.</p>