Search code examples
amazon-web-servicesssh-keysaws-opsworksrailsapps

Error on trying to add Private key to AWS Opsworks


I am trying to set up a new rails app on AWS Opswork.

While trying to add a new app, I keep getting the error "Please provide a valid SSH key"

I have created a public-private key pair using ssh-keygen, added the public key in Github and I am trying to add the PRIVATE key in AWS Opswork page. But I keep getting the SSH key error.enter image description here

Please help.


Solution

  • It seems that OpsWorks only accepts keys in PEM format, which is not the default on newer versions of OpenSSH. (BEGIN RSA PRIVATE KEY vs BEGIN OPENSSH PRIVATE KEY).

    Convert the key in-place by running ssh-keygen -p -N "" -m pem -f privatekeyfile