PKI---PUB(1)
β¨ NAME β¨
okay so welcome to PKI --PUB(1), bestie π
β this is the pki --pub sub-command, and it literally extracts a public key from a private key or certificate. slay.
πΈ SYNOPSIS πΈ
pki --pub [--in file|--keyid hex] [--type type] [--outform encoding]
[--debug level]
pki --pub --options file
pki --pub -h | --help
π¦ DESCRIPTION π¦
This sub-command of pki(1) extracts public keys from private keys and certificates. no cap, that's the whole main-character job π
π OPTIONS π
-h,--helpβ print usage information with a summary of the available options. your little map of what's possible β¨-v,--debuglevel β set the debug level, default:1. turn up the yapping if you need more details π-+,--optionsfile β read command line options fromfile. yes, that plus sign is real, don't panic π«Ά-i,--infile β input file. if it's not given, the input is read fromSTDIN. pipe it in, bestie π-x,--keyidhex β Smartcard or TPM private key object handle in hex format, with an optional0xprefix. fancy hardware vibes π₯-t,--typetype β type of input. one ofpriv(private key),rsa(RSA private key),ecdsa(ECDSA private key),pub(public key),pkcs10(PKCS#10 certificate request), orx509(X.509 certificate), defaults topriv. pick your fighter π-f,--outformencoding β encoding of the extracted public key. one ofder(ASN.1 DER),pem(Base64 PEM),dnskey(RFC 3110 DNS key), orsshkey(RFC 4253 SSH key), defaults toder. choose the format that matches your vibe π
π EXAMPLES π
Extract the public key from an RSA private key:
pki --pub --in key.der > pub.der
Extract the public key from an X.509 certificate:
pki --pub --in cert.der --type x509 > pub.der
π SEE ALSO π
pki(1) β go check out the parent page too, iykyk π
that's the whole thing, bestie β strongSwan 6.1.0, dated 2013-07-31, signing off with immaculate key-extraction energy π
β¨
π¦ where this page comes from
- arch rolling: strongswan 6.1.0-2 Β· GPL-2.0-only
- nixos 26.05: strongswan 6.1.0
- nixpkgs unstable: strongswan 6.1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms