Generating local key pairs

The DSA, RSA, or ECDSA key pairs are required for generating the session key and session ID in the key exchange stage. The key pairs can also be used by a client to authenticate the server. When a client authenticates a server, it compares the public key received from the server with the server public key that it saved locally. If the keys are consistent, the client uses the locally saved server's public key to decrypt the digital signature received from the server. If the decryption succeeds, the server passes the authentication.

Configuration restrictions and guidelines

When you generate local key pairs, follow these restrictions and guidelines:

Configuration procedure

To generate local key pairs on the SSH server:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Generate local key pairs.

public-key local create { dsa | ecdsa secp256r1 | rsa }

By default, no local key pairs exist.