This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

The private key is not formatted correctly when setting up SAM certificate credentials

I have an ssh rsa private key that can be used to ssh without a password to a set of servers.

using the SAM certificate credentials library, i proceed to paste the contents of an existing rsa private key.  i set the username and leave the passphrase blank (since this is a passwordless key).

the response i get is: The private key is not formatted correctly or it is encrypted and the password is either wrong or missing. It is also possible that an error occurred during import.

i notice that it says that it has to be in PEM format, but i read that private keys are already in PEM format.   Any thoughts on what I'm doing wrong?


  • Have you found a solution for this? If so, please share emoticons_happy.png

  • unfortunately not yet.  I may revisit this soon and post if I come up with solution.

  • The certificate must be in PEM format to be imported into SAM. The Certificate will look similar to the following. In fact you can import the one below if you like, there's no password encrypting this example.

    -----BEGIN RSA PRIVATE KEY-----

    MIICWQIBAAKBgHsSuRPLMDrxcwMB9P6ubGFGmlSvHvSXq2kfwycrcEKf/TCctShz

    A2HYo2IWed8n1rqazlESHnhNmCWlFWIMMFWagZyDBy9yy71MhWISvoTuQVyCx/z3

    q1v171fy+Ds5smKwZ8wK3bgwBTR7BTKfYNmearDZvPJgwK0jsYEJDZ/DAgElAoGA

    MeT+7FlK53akP31VfAGF4j83pcp0VVI+kmbSk1bMpWN0e33M5uKE1KPvNZpowkCV

    UpHJQ3YMWkj4ffbRUUM2L/jQmKkICf7vynIdq5cj+lF6lNXSzwq6pVR6/octdeKS

    /70DuGcVG+LiRTu2mRb6mPY9bIJIvcgenXajnVanx9UCQQDRwf6oyU/EH4x+kw/X

    QZi/RebtDPD1yIQuhVG8B1xkPxBsAywTwVDL7DSZ1BsbWJcl5HcXt/q0n/3NZ62X

    Rr1VAkEAljSLsMOk5H7XCctEk3mCu1WgDtUvb/RRCBiBT+cic14OpVtytJMAeLeq

    cAhIj54ef4hQPGKbAsQZ3E/X4EsotwJAa7alXZfPA9jZcW4c5Ciai7wcoz3/Mhrc

    F+OYrKnVf5YBg5LtHua6yZT4aqswg6oIbWd7bQty5yG5rqrcmcphOQJAHGrOUd/T

    FnjckyZ0wfRk11VjeG2Fg+IdKwuOFgkiMYB/T7da4+R1tfk7666KRK82M82uUJ0I

    kdISuvpZRhwOnwJBAI34lnrN4bNcUVB5kAXT9huyH8tJomNdsJOufS3vCi5tKaqK

    Ic3jMIwtyuXsn4NhJNUFlgfPL70CPtb3x/eePqw=

    -----END RSA PRIVATE KEY-----

  • I had the same issue, until I made sure that I had the Begin RSA Private Key and the End RSA Private Key lines in my key.....who knew.

    Thanks for your example aLTeReGo I was scratching my head at this one until I saw exactly what needed to go in there.

  • I converted my ssh PPK file into a PEM file via puttygen and I still get the same error.  Posting the example key you provided doesn't even work. i feel like there is something I'm missing. Any help would be much appreciated!

  • Appears to work for me using SAM 6.6.1. Ensure there are no unexpected carriage returns when pasting the certificate into the text field.

    pastedImage_0.png