313
For more information about the
display public-key local
and
display public-key peer
commands, see
Security Command Reference
.
SSH server configuration examples
Unless otherwise noted, devices in the configuration examples are operating in non-FIPS mode.
When the switch acts as a server for password authentication
Network requirements
As shown in
, a host (the SSH client) and a switch (the SSH server) are directly connected.
Configure an SSH user on the switch so that the host can securely log in to the switch after passing
password authentication. Configure a username and password for the user on the switch.
Figure 91
Network diagram
Configuration procedure
1.
Configure the SSH server:
# Generate the RSA key pairs.
<Switch> system-view
[Switch] public-key local create rsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:
Generating Keys...
++++++++
++++++++++++++
+++++
++++++++
# Generate a DSA key pair.
[Switch] public-key local create dsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:
Generating Keys...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++
# Enable the SSH server.
[Switch] ssh server enable