Configuration Guide Configuring SSH
 Configuring DSA Public Key Authentication
ip ssh peer test public-key dsaflash:dsa.pub
test: Indicates the user name.
dsa: Indicates that the public key type is DSA.
dsa.pub: Indicates the name of a public key file.
Global configuration mode
This command is used to configure the DSA key file associated with user test.
Only SSHv2 supports authentication based on the public key. This command associates the public key file
on the client with the user name. When the client is authenticated upon login, a public key file is specified
based on the user name.
Configuration Example
The following configuration examples describe only configurations related to SSH.
 Generating a Public Key on the SSH Server
 Run the crypto key generate { rsa | dsa } command to generate a RSA public key for the server.
Ruijie#configure terminal
Ruijie(config)# crypto key generate rsa
Choose the size of the rsa key modulus in the range of 512 to 2048
and the size of the dsa key modulus in the range of 360 to 2048 for your
Signature Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]:
 If the generation of the RSA key is successful, the following information is displayed:
% Generating 512 bit RSA1 keys ...[ok]
% Generating 512 bit RSA keys ...[ok]
 If the generation of the RSA key fails, the following information is displayed:
% Generating 512 bit RSA1 keys ...[fail]
% Generating 512 bit RSA keys ...[fail]
 Run the show crypto key mypubkey rsa command to display the public information about the RSA