To create a Secure Shell (SSH) server key, use the ssh key command. To remove the SSH server key, use the no form of this command.
ssh key { dsa [ force ] | rsa [ length [ force ]]}
no ssh key [ dsa | rsa ]
|
dsa
|
Specifies the Digital System Algorithm (DSA) SSH server key.
|
|
force
|
(Optional) Forces the generation of a DSA SSH key even if previous ones are present.
|
|
rsa
|
Specifies the Rivest, Shamir, and Adelman (RSA) public-key cryptography SSH server key.
|
|
length
|
(Optional) Number of bits to use when creating the SSH server key. The range is from 768 to 2048.
|
1024-bit length
Global configuration mode
|
Release
|
Modification
|
|
4.0(0)N1(1a)
|
This command was introduced.
|
The Cisco NX-OS software supports SSH version 2.
If you want to remove or replace an SSH server key, you must first disable the SSH server using the no ssh server enable command.
This example shows how to create an SSH server key using RSA with the default key length:
This example shows how to create an SSH server key using RSA with a specified key length:
This example shows how to replace an SSH server key using DSA with the force option:
This example shows how to remove the DSA SSH server key:
This example shows how to remove all SSH server keys:
|
Command
|
Description
|
|---|---|
|
show ssh key
|
Displays the SSH server key information.
|
|
ssh server enable
|
Enables the SSH server.
|