R3303-HP HSR6800 Routers Security Configuration Guide

332
[RouterA-pkey-public-key] peer-public-key end
# Specify the host public key for the Stelnet server 192.168.1.40 as key1.
[RouterA] ssh client authentication server 10.165.87.136 assign publickey key1
[RouterA] quit
# Establish an SSH connection to SSH server 192.168.1.40.
<RouterA> ssh2 192.168.1.40
Username: client001
Trying 192.168.1.40
Press CTRL+K to abort
Connected to 192.168.1.40...
Enter password:
After you enter the correct username and password, you can log in to Router B successfully.
Publickey authentication enabled Stelnet client configuration
example
Network requirements
As shown in Figure 109, you can log in to Router B through the Stelnet client that runs on Router A. Router
B acts as the Stelnet server, adopting publickey authentication and the DSA public key algorithm.
Figure 109 Network diagram
Configuration considerations
In the server configuration, the client public key is required. Use the client software to generate a DSA key
pair on the client before configuring the Stelnet server.
Configuration procedure
1. Configure the Stelnet client:
# Configure an IP address for interface GigabitEthernet 3/0/1.
<RouterA> system-view
[RouterA] interface gigabitethernet 3/0/1
[RouterA-GigabitEthernet3/0/1] ip address 192.168.1.56 255.255.255.0
[RouterA-GigabitEthernet3/0/1] quit
# Generate a DSA key pair.
[RouterA] 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...