Command Line Interface
6631553-KDU 137 365 Uen D 2006-06-16
7.7.25 ip ssh crypto host-key generate
This command generates the host key pair (that is, public and private).
Syntax
ip ssh crypto host-key generate [dsa | rsa]
• dsa – DSA (Version 2) key type.
• rsa – RSA (Version 1) key type.
Default Setting
Generates both the DSA and RSA key pairs.
Command Mode
Privileged Exec
Command Usage
• This command stores the host key pair in memory (that is, RAM). Use
the ip ssh save host-key command to save the host key pair to
flash memory.
• Some SSH client programs automatically add the public key to the
known hosts file as part of the configuration process. Otherwise, a
known hosts file must be manually created and the host public key
placed in it.
• The SSH server uses this host key to negotiate a session key and
encryption method with the client trying to connect to it.
Example
Console#ip ssh crypto host-key generate dsa
Console#