
djm at mindrot
Jun 19, 2009, 2:52 AM
Post #2 of 3
(3601 views)
Permalink
|
On Thu, 18 Jun 2009, Adriana Rodean wrote: > Hi > > I have a certificate in der format, from it with this command i > generate a public key: > > openssl x509 -inform der -in ejbcacert.cer -noout -pubkey > pub1key.pub > > result is this: > > -----BEGIN PUBLIC KEY----- > MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7vbqajDw4o6gJy8UtmIbkcpnk > O3Kwc4qsEnSZp/TR+fQi62F79RHWmwKOtFmwteURgLbj7D/WGuNLGOfa/2vse3G2 > eHnHl5CB8ruRX9fBl/KgwCVr2JaEuUm66bBQeP5XeBotdR4cvX38uPYivCDdPjJ1 > QWPdspTBKcxeFbccDwIDAQAB > -----END PUBLIC KEY----- > > How can i obtain a public key like this? Either from certificate or > from this public key? I'm not sure of what you are after: an OpenSSH public key, a PEM public key or something else? You can extract a PEM public key from an OpenSSH private key using: openssl rsa -pubout -in .ssh/id_rsa But OpenSSH has no tools to convert from or too PEM public keys (note: PEM private keys are OpenSSH's native format for protocol 2 keys). -d _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev [at] mindrot https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
|