R0106-HP MSR Router Series Security Command Reference(V7)
238
Related commands
• public-key local create
• public-key peer import sshkey
public-key local export rsa
Use public-key local export rsa to display the local RSA host public key in a specific format, or export the
key to a specific file.
Syntax
In non-FIPS mode:
public-key local export rsa [ name key-name ] { openssh | ssh1 | ssh2 } [ filename ]
In FIPS mode:
public-key local export rsa [ name key-name ] { openssh | ssh2 } [ filename ]
Views
System view
Predefined user roles
network-admin
Parameters
name key-name: Specifies the name of a local RSA 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.
ssh1: Uses the format of SSH1.5.
ssh2: Uses the format of SSH2.0.
filename: Specifies a file 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 host public key depends on the presence of the filename
argument.
You can use the command to display or export the local RSA host public keys 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 rsa [ name key-name ] { openssh | ssh2 } command to display
the host public key in the specified format, copy and paste it to a file.
{ Use the public-key local export rsa [ 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
and its subfolders.
2. Transfer a copy of the file to the peer device, for example, by using FTP or TFTP in binary mode.










