
1-14
Examples
# Destroy the RSA key pair of the current switch.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname]public-key local destroy dsa
% Confirm to destroy these keys? [Y/N]:y
......
# Destroy the DSA key pair of the current switch.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] public-key local destroy dsa
% Confirm to destroy these keys? [Y/N]:y
......
public-key local export rsa
Syntax
public-key local export rsa
{
openssh
|
ssh1
|
ssh2
}
[
filename
]
View
System view
Parameters
rsa
: Specifies the host public key of the current switch’s RSA key pair.
openssh
: Specifies the format of the exported file as OpenSSH.
ssh1
: Specifies the format of the exported file as SSH1.
ssh2
: Specifies the format of the exported file as SSH2.
filename
: Name of the file for saving the host public key, a string of 1 to 142 characters. For file naming
rules, refer to
File System Management Command
.
Description
Use the
public-key local export rsa
command to display the host public key of the current switch’s
RSA key pair on the screen or export it to a specified file.
If you specify a filename, the host public key will be exported to the file and the file will be saved. If you
do not specify any filename, the host public key will be displayed on the screen.
z
SSH1, SSH2, and OpenSSH are three public key file formats. You can choose one as required.
z
The host public key displayed on the screen is in a format that is not transformed and cannot be
used as the public key data for public key configuration.
Related commands:
public-key local create
,
rsa local-key-pair create
.