H3C S6812 Series Command Reference Manual page 1954

Hide thumbs Also See for S6812 Series:
Table of Contents

Advertisement

public-key local export dsa
Use public-key local export dsa to export a local DSA host public key.
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 a local DSA key pair by its name, a case-insensitive string of 1 to 64
characters. Valid characters are letters, digits, and hyphens (-). If you do not specify a key pair, this
command exports the host public key of the local DSA key pair with the default name.
openssh: Exports the host public key in OpenSSH format.
ssh2: Exports the host public key in SSH 2.0 format.
filename: Specifies the name of the file for saving the DSA host public key. The file name is a
case-insensitive string. The name cannot be all dots (.), hostkey, serverkey, dsakey, or ecdsakey,
and cannot start with a slash (/) or contain ./ and ../. The file name can contain 1 to 128 characters.
For more information about file names, see Fundamentals Configuration Guide. If you do not specify
a file name, this command does not export the key to a file but displays the key on the monitor
screen.
Usage guidelines
You can use this command to export a local DSA host public key before distributing it to a peer
device.
To distribute a local DSA host public key to a peer device:
1.
Save the exported local host public key to a file by using one of the following methods:
Use the public-key local export dsa [ name key-name ] { openssh | ssh2 } command to
export the local host public key, and then copy and paste the key to a file.
Use the public-key local export dsa [ name key-name ] { openssh | ssh2 } filename
command to export the key to a file. You cannot export the key to the folder pkey or its
subfolders.
2.
Transfer a copy of the file to the peer device, for example, by using FTP in binary mode or TFTP.
For more information about FTP and TFTP, see Fundamentals Configuration Guide.
3.
On the peer device, use the public-key peer import sshkey command to import the host
public key from the file.
SSH 2.0 and OpenSSH are different public key formats. Choose the correct format that is supported
on the device where you import the host public key.
Examples
# Export the host public key of the local DSA key pair with the default name in OpenSSH format to a
file named key.pub.
<Sysname> system-view
[Sysname] public-key local export dsa openssh key.pub
# Display the host public key of the local DSA key pair with the default name in SSH 2.0 format.
<Sysname> system-view
[Sysname] public-key local export dsa ssh2
---- BEGIN SSH2 PUBLIC KEY ----
12

Advertisement

Table of Contents
loading

This manual is also suitable for:

S6813 seriesS5150-ei

Table of Contents