238
Confirm to destroy the key pair? [Y/N]:y
Related commands
public-key local create
public-key local export dsa
Use public-key local export dsa to display local DSA host public keys in a specific format, or export the
key in a specific format to a file.
Syntax
public-key local export dsa [ name key-name ] { openssh | ssh2 } [ filename ]
Views
System view
Predefined user roles
network-admin
Parameters
name key-name: Specifies the name of a local DSA key pair. The key-name argument is a case-insensitive
string of 1 to 64 characters, including letters, digits, and hyphens (-). If no name is provided, the
command displays or exports the host public key of the local DSA key pair with the default name.
openssh: Uses the format of OpenSSH.
ssh2: Uses the format of SSH2.0.
filename: Specifies a file by its name for saving the local host public key. The file name is a
case-insensitive string of 1 to 128 characters, which cannot be hostkey, serverkey, dsakey, ecdsakey, or
all dots (.). In addition, it cannot start with a forward slash (/) or contain characters ./ or ../. For more
information about file names, see Fundamentals Configuration Guide.
Usage guidelines
Whether the command exports or displays the local DSA host public key depends on the presence of the
filename argument.
You can use the command to display or export the local DSA host public key before distributing it to a
peer device.
1. Save the local host public key to a file with one of the following methods:
{ Use the public-key local export dsa [ name key-name ] { openssh | ssh2 } command to display
the local host public key in the specific format, copy and paste it to a file.
{ Use the public-key local export dsa [ name key-name ] { openssh | ssh2 } filename command
to export the host public key to the file. You cannot export the host public key to the folder pkey
or its subfolders.
2. Transfer a copy of the file to the peer device, for example, by using FTP or TFTP in binary mode.
3. On the peer device, use the public-key peer import sshkey command to import the host public key
from the file.
SSH2.0 and OpenSSH are different public key formats. Choose the proper format that is supported on
the device where you import the host public key.