Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anyone got any ideas on getting a .pem key from EC2 into this? I got my non-EC2 id_rsa into it just fine, but .pems seem to disappear.


You can convert the .pem by doing something like:

openssl rsa -in test.pem > test.rsa


The following sequence of commands worked for me:

    openssl rsa -in ec2.pem > ec2.rsa
    chmod 700 ec2.rsa
    ssh-keygen -y -f ec2.rsa > ec2.rsa.pub
Then I added both ec2.rsa and ec2.rsa.pub to the app.


Running that on my EC2 .pem yields this:

unable to load Private Key 56049:error:0906D06C:PEM routines:PEM_read_bio:no start line:/SourceCache/OpenSSL098/OpenSSL098-35/src/crypto/pem/pem_lib.c:650:Expecting: ANY PRIVATE KEY


Just checked the .pem I was given (by a person, not by Amazon) - looks like it was an RSA format key all along. I'm a little confused - it's possible I'm an idiot.

I'll check to make sure I'm an idiot by seeing what I can generate from Amazon itself.


I've noticed the same thing. AWS keys appear to actually be RSA keys, with a .pem extension.


They still don't seem to work with the app though. I've tried multiple approaches and it keeps claiming the key was rejected by the server. The ssh log only shows:

    Apr 14 21:20:51 ip---- sshd[31560]: Received disconnect from ---------: 11: Normal Shutdown. Thank you!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: