step crypto key public

Name

step crypto key public -- print the public key from a private key or certificate

Usage

step crypto key public <key-file> [--out=<file>]
[--password-file=<file>]

Description

step crypto key public outputs the public key, in PEM format, corresponding to the input file.

Positional arguments

key-file Path to a private key.

Options

--out=file The file to write the public key.

--password-file=file The path to the file containing the password to encrypt or decrypt the private key.

-f, --force Force the overwrite of files without asking.

Examples

Print the corresponding public key:

$ step crypto key public priv.pem

Print the public key of an x509 certificate:

$ step crypto key public foo.crt

Write the corresponding public key to a file:

$ step crypto key public --out pub.pem key.pem