/ip/ssh/export-host-key

export-host-key

将 RSA/Ed25519 公钥和私钥导出到文件。


ip/ssh/export-host-key

Type: Command

将 RSA/Ed25519 公钥和私钥导出到文件。

信息

主机密钥以 PKCS#8 格式导出。

导出 SSH 主机密钥需要 "sensitive" 用户策略。 | 参数 | 类型 | 描述 | | --- | --- | --- | | key-file-prefix | string | 生成文件的前缀:例如 my 会为 RSA 主机密钥生成 my_rsa.pem(私钥)和 my_rsa_pub.pem(公钥),或为 Ed25519 主机密钥生成 my_ed25519.pem 和 my_ed25519_pub.pem。两个文件均为 PKCS#8 PEM 格式。 | | passphrase | string | 私钥密码短语。 |