Name
ssh-keygen
Synopsis
ssh-keygen [options]Generate, manage, and convert authentication keys for ssh. When using ssh-keygen to create a key, the -t option must be specified to identify the type of key to create.
Options
- -b bits
Specify the number of bits in the key. For RSA keys, the minimum is 512, and the default is 2048. DSA keys must be exactly 1024 bits.
- -B
Show the bubblebabble digest (a digest represented as a string that looks like real words) for the private or public keyfile specified with -f.
- -c
Change the comment in the private and public keyfiles (for RSA1 keys only).
- -C comment
Specify a new comment.
- -D reader
Download the RSA public key from the smartcard in reader.
- -e
Read an OpenSSH private or public keyfile and write it in SECSH Public Key File Format to standard output for exporting to a commercial SSH.
- -f file
Specify the filename of the keyfile.
- -F hostname
List occurrences of the specified hostname found in a known_hosts file. Useful with -H to print keys that were found in a hashed format.
- -H
Hash a known_hosts file.
- -i
Read an SSH2-compatible unencrypted private or public keyfile and write an OpenSSH-compatible key to standard output. Used to import keys from a commercial SSH.
- -l
Show fingerprint of public or private RSA1 keyfile specified with -f. With -v, also displays an ASCII art representation of the key.
- -N passphrase
Specify the new passphrase.
- -p
Change the passphrase for a private keyfile. Prompt for the file, the old passphrase, and twice for the new passphrase.
- -P passphrase ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access