Chapter 8
| Authentication Commands
Secure Shell
– 281 –
ip ssh crypto
host-key generate
This command generates the host key pair (i.e., 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
â—† The switch uses only RSA Version 1 for SSHv1.5 clients and DSA Version 2 for
SSHv2 clients.
â—† This command stores the host key pair in memory (i.e., 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, you must manually create a
known hosts file and place the host public key 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#
Related Commands
ip ssh crypto zeroize (281)
ip ssh save host-key (282)
ip ssh crypto zeroize This command clears the host key from memory (i.e. RAM).
Syntax
ip ssh crypto zeroize [dsa | rsa]
dsa – DSA key type.
rsa – RSA key type.
Default Setting
Clears both the DSA and RSA key.