密钥管理Key Management
生成、导入、导出,私钥始终在硬件保险箱里。
生成
在「密钥管理」点「新建密钥」生成一对 Ed25519 密钥并自动选用。随后复制公钥,加入服务器的 ~/.ssh/authorized_keys。
导入
- 从文件导入:macOS 文件面板按 ⇧⌘. 可显示
~/.ssh隐藏目录。 - 手动粘贴:贴入 PEM。仅支持 OpenSSH 格式(
-----BEGIN OPENSSH PRIVATE KEY-----)。 - 加密私钥填写口令,口令随私钥一并安全存入钥匙串。
导出
「查看 / 导出私钥」可把密钥对打包为 zip(私钥 + .pub 公钥)导出。
删除一个密钥,移除的是钥匙串中的私钥、口令与本地记录;服务器上的
authorized_keys 不受影响,需自行清理。Generate, import, export — private keys stay in the hardware vault.
Generate
In “Key Management”, tap “New Key” to generate an Ed25519 pair and select it automatically. Then copy the public key into the server’s ~/.ssh/authorized_keys.
Import
- From file: in the macOS panel press ⇧⌘. to reveal the hidden
~/.sshdirectory. - Paste: paste a PEM. Only OpenSSH format is supported (
-----BEGIN OPENSSH PRIVATE KEY-----). - For an encrypted key, enter the passphrase — it is stored securely in the Keychain alongside the key.
Export
“View / Export Private Key” can export the key pair as a zip (private key + .pub).
Deleting a key removes the private key, passphrase and local record from the Keychain. The server’s
authorized_keys is untouched — clean that up yourself.