Exporting the rsa or dsa public key, Exporting the rsa or dsa public key -6 – H3C Technologies H3C WX3000 Series Unified Switches User Manual

Page 478

Advertising
background image

46-6

To do…

Use the command…

Remarks

rsa local-key-pair create

Generate an RSA key
pair

public-key local create rsa

Required
Use either command
By default, no RSA key pair is created.

rsa local-key-pair destroy

Destroy the RSA key
pair

public-key local destroy rsa

Optional
Use either command to destroy the configured
RSA key pair.

Generate a DSA key
pair

public-key local create dsa

Required
By default, no DSA key pair is created.

Destroy the DSA key
pair

public-key local destroy dsa

Optional
Use the command to destroy the configured
DSA key pair.

z

After an RSA key pair is generated, you can execute the display rsa local-key-pair public or

display public-key local rsa public

command, which will display two public keys (the host public

key and server public key) if the device works in SSH1.x-compatible mode, or only one public key
(the host public key) if the device works in SSH2 mode.

z

The command for generating a key pair can survive a reboot. You only need to configure it once.

z

Some third-party software, for example, WinSCP, requires that the modulo of a public key be
greater than or equal to 768. Therefore, a local key pair of more than 768 bits is recommended.

Exporting the RSA or DSA Public Key

You can display the generated RSA or DSA key pair on the screen in a specified format, or export it to a
specified file for configuring the key at a remote end.

Follow these steps to export the RSA public key:

To do…

Use the command…

Remarks

Enter system view

system-view

Display the RSA key on the screen in a
specified format or export it to a specified
file

public-key local export rsa

{ openssh |

ssh1

| ssh2 } [ filnename ]

Required

Follow these steps to export the DSA public key:

To do…

Use the command…

Remarks

Enter system view

system-view

Display the DSA key on the screen
in a specified format or export it to
a specified file

public-key local export dsa
{ openssh | ssh2 } [ filnename ]

Required

Advertising