title: SSH key *.pem get fingerprint?
body: <p>I want to have a fingerprint of my SSH key file which is a private key (PEM file).</p>
  
  <p>I tried following <a href="https://stackoverflow.com/questions/2635360/ssh-keygen-accepting-stdin">this</a> and <a href="https://stackoverflow.com/questions/6749128/store-output-of-sed-into-a-variable">that</a> advice:</p>
  
  <pre><code>key=$(ssh-keygen -yf lony.pem) | echo $key | ssh-keygen -lf /dev/stdin &lt;&lt;&lt;"$key"
  </code></pre>
  
  <p>Resulting int this error:</p>
  
  <blockquote>
    <p>/dev/stdin is not a public key file.</p>
  </blockquote>
  
  <p>The key file looks like:</p>
  
  <blockquote>
    <p>-----BEGIN RSA PRIVATE KEY----- <br>
    .. <br>
    -----END RSA PRIVATE KEY-----</p>
  </blockquote>
  
  <p>How can I get the fingerprint?</p>