Using the SSH_KEYGEN Utility

 » Table of Contents

 » Glossary

 » Index

SSH_KEYGEN is the key-pair generation utility that generates and manages authentication keys for SSH. Users who need to use SSH with public-key authentication can run this utility to create authentication keys. The system manager can also use this utility to generate host keys. To set up public key authentication, see “Setting Up Public Key Authentication.”

Command Synopsis

SSH_KEYGEN [options] [key1 key2...]

Parameters

The [key1 key2...] parameter specifies the name of one or more keys to generate.

Options

Table 7–4 describes the options that you can use with the SSH_KEYGEN command.

Table 7-4 SSH_KEYGEN Command Options

OptionsDescription
-b key-numberSpecifies the key strength, in bits. The default is 2048.
-t key-algorithmSpecifies the algorithm used to generate the keys. Specify either DSA or RSA. The default is DSA.
-c comment-stringSpecifies the key's comment string.
-p passphraseSpecifies the passphrase used to protect the key.
-PSpecifies that the key will be saved with an empty passphrase.
-h | -?Displays a short summary of SSH_KEYGEN options.
-qHides the progress indicator.
-D fileDerives the public key from the private key file.
-i fileLoads and displays information on a file.
-B numberSpecifies the number base for displaying key information. The default is 10.
-VDisplays the version string and exits.
-r fileRandomizes data from a file to a random pool.
-F fileDumps the fingerprint (a unique identifier) of the public key file.