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