Search This Blog

Tuesday, June 11, 2013

Public key types


1. OpenSSH key type

ssh-rsa AXCAB3NzaC1yc2EAAABAJQAAAIEAmGd3y/xJDjUeaJvFhRkcfpywWyrK3ZlR828E
jN4G0S0RsAgFiDnGGsYz5HuzZM1A+AabcswyMzhMoQDOKr99jLr/WbEdN2tZ8gN2
44C+LSXIAy3lCQgAWnYtOuAdBxmfcX3kQAH+ktejPd6GA1qAnPAHkv/+TaAawvAm
FbAA030=

2. OpenSSL PEM (Privacy Enhanced Mail) key type

-----BEGIN CERTIFICATE-----
QT8AG4baZYOizxdycd5tYazANBgkqhkiG9w0BAQUFADB3MQswCQYDVQQG [...]
-----END CERTIFICATE-----

Convert private OpenSSL to public OpenSSH:
ssh-keygen -y -f company.com.key > company.com.pub

Convert OpenSSH to OpenSSL PEM:
ssh-keygen -f key.pub -e -m pem > key.pem.pub

3. Convert:-----BEGIN PRIVATE KEY----- -----END PRIVATE KEY-----
to: -----BEGIN RSA PRIVATE KEY----- -----END RSA PRIVATE KEY-----

openssl rsa -in mykey.key -text > mykey.pem

4. Convert CSR to -----BEGIN PUBLIC KEY----- -----END PUBLIC KEY-----

openssl req -in brodline.com.csr -pubkey -noout

5. Issued certificate should be of a format:
 -----BEGIN CERTIFICATE----- -----END CERTIFICATE-----

No comments:

Post a Comment

If you like this post, please leave a comment :)