219
Distributing a local host public key
You must distribute a local host public key to a peer device so the peer device can perform the
following operations:
• Use the public key to encrypt information sent to the local device.
• Authenticate the digital signature signed by the local device.
To distribute a local host public key, you must first export or display the key.
• Export a host public key:
ï‚¡ Export a host public to a file.
ï‚¡ Export a host public key to the monitor screen, and then save it to a file.
After the key is exported to a file, transfer the file to the peer device. On the peer device, import
the key from the file.
• Display a host public key.
After the key is displayed, record the key, for example, copy it to an unformatted file. On the
peer device, you must literally enter the key.
Exporting a host public key
When you export a host public key, follow these restrictions and guidelines:
• If you specify a file name in the command, the command exports the key to the specified file.
• If you do not specify a file name, the command exports the key to the monitor screen. You must
manually save the exported key to a file.
To export a local host public key:
1.
view.
system-view
N/A
2. Export a local
key.
• Export an RSA host public key:
ï‚¡ In non-FIPS mode:
public-
[ name key-name ] { openssh |
ssh1 | ssh2 } [ filename ]
ï‚¡ In FIPS mode:
public-key local export rsa
[ name key-name ] { openssh |
ssh2 } [ filename ]
• Export an ECDSA host public key:
public-key local export ecdsa
[ name key-name ] { openssh |
ssh2 } [ filename ]
• Export a DSA host public key:
public-key local export dsa [ name
key-name ] { openssh | ssh2 }
[ filename ]
The
public-key local export ecdsa
command is available in Release 1121
and later.
Displaying a host public key
Perform the following tasks in any view: