R3303-HP HSR6800 Routers Security Command Reference

232
public-key local export
Use public-key local export to display an RSA key pair in PEM format on the terminal.
Syntax
public-key local export rsa name key-name pem { 3des-cbc | aes-cbc-128 | aes-cbc-192 | aes-cbc-256
| des-cbc } password
Views
System view
Default command level
2: System level
Parameters
rsa: Specifies an RSA key pair.
name key-name: Specifies an RSA key pair by its name. The key-name argument is a case-insensitive
string of 1 to 64 characters, including letters, digits, and hyphens (-).
pem: Specifies the PEM format.
3des-cbc: Specifies the 3DES_CBC encryption algorithm.
aes-cbc-128: Specifies the 128-bit AES_CBC encryption algorithm.
aes-cbc-192: Specifies the 192-bit AES_CBC encryption algorithm.
aes-cbc-256: Specifies the 256-bit AES_CBC encryption algorithm.
password: Specifies a password used to encrypt the RSA key pair.
Usage guidelines
You must specify an encryption algorithm and password to encrypt the specified RSA key pair. The router
does not support displaying RSA key pairs in plaintext.
You cannot display the default RSA key pair.
Examples
# Display the RSA key pair named mykey in PEM format on the terminal, and set the encryption
algorithm and password to 3des-cbc and 1234 5678 , respectively.
<Sysname> system-view
[Sysname] public-key local export rsa name mykey pem 3des-cbc 12345678
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6Ne4EtnoKqBCL2YZvSjrG+8He
sae5FWtyj9D25PEkXagpLqb3i9Gm/Qbb6cqLLPUIgDS8eK7Wt/dXLeFUCDc0lY8V
gujJPvarFL4+Jn+VuL9znNbboA9IxPH2fMvew8lkPCwkXoP+52J+1LRpYkh+rIpE
Kj7FG/3/wzGsXu8WJQIDAQAB
-----END PUBLIC KEY-----
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,7F8FAB15399DF87C
MGaftNqe4esjetm7bRJHSpsbwZ9YUpvA9iWh8R406NGq8e+1A/ZiK23+t1XqRwaU
1FXnwbqHgW1pZ7JxQdgBuC9uXc4VQyP/xe6xCyUepdMC71fmeOaiwUFrj6LAzzBg