218
NOTE:
For more information about the display public-key local and display public-key peer commands, see
the
Security Command Reference
.
SSH server configuration examples
When switch acts as server for password authentication
Network requirements
As shown in Figure 58, an SSH connection is required between the host and the switch for secure data
exchange. Use password authentication and configure a username and password for the host on the
switch.
Figure 58 Switch acts as server for password authentication
SSH client SSH server
Host Switch
192.168.0.2/24
Vlan-int1
192.168.0.1/24
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...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++