Very useful for POUND proxys and OS X CA’s
As a side note, to export a Private key from OS X keychain you must select BOTH the private key and the certificate it is linked too. Easiest way to do this is view the keys, then swing down the arrow next to the key you want to show the Certificate. Select BOTH and then right click and chose Export. This will produce a P12 file with the Certificate and Private key.
You can use following commands to extract public/private key from a PKCS#12 container:
Private key:
Certificates:
To extract the private key in a format openssh can use:
To convert the private key to a public key:
To extract the public key in a format openssh can use:
To Convert to a PEM including private keys