Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I need to send a public key to my bank. I'm using CoreFTP which allows the generation of keys using RSA. It says that it generates "OpenSSH compatible certificates [sic]" when you press the generate keys button.

The keys it generates have

-----BEGIN RSA PUBLIC KEY-----

at the start (and then the key and then an end marker).

My bank rejects my public key and says it should begin ssh-rsa.

I suspect "RSA" and "OpenSSH" have variations that neither end are being clear about what they generate/expect.

How can I convert my key from the format the CoreFTP is providing to the format my bank wants?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I believe the reason is that the CoreFTP is actually generating OpenSSL keys and not OpenSSH formatted ones.

Perhaps your question is already answered on Stackoverflow?

http://stackoverflow.com/q/1011572/643314

From Victor Matare on SO:

You can do the same with ssh-keygen:

ssh-keygen -f pub1key.pub -i -m PKCS8

will read the public key in openssl format from pub1key.pub and output it in openssh format.
share|improve this answer
    
Thanks. I didn't look on SO as I thought my question would be off topic there. –  paulmorriss Apr 23 '12 at 9:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.