目前有两个主流的密钥格式:OpenSSH格式的密钥 和 PuTTY格式的密钥,今天尝试使用PuTTY生成密钥。
1. 安装putty
% brew install putty
Running `brew update --auto-update`...
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################## 100.0%
==> Fetching putty
==> Downloading https://ghcr.io/v2/homebrew/core/putty/manifests/0.78
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/putty/blobs/sha256:98350a82ed60a6d22d3ef1fad8dc3a5e2ce8d44f2fea51d6f853315fed7b2a9e
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:98350a82ed60a6d22d3ef1fad8dc3a5e2ce8d44f2fea51d6f853315fed7b2
######################################################################## 100.0%
==> Pouring putty--0.78.arm64_monterey.bottle.tar.gz
🍺 /opt/homebrew/Cellar/putty/0.78: 17 files, 3.7MB
==> Running `brew cleanup putty`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
2. 查看puttygen命令的帮助文档
% man puttygen
2.1 输出文件格式
-O output-type
Specif

本文详细介绍了如何在Mac上通过Homebrew安装PuTTY,使用PuTTYgen生成不同格式的SSH密钥,包括无密码的4096位RSA密钥,并展示了如何将密钥转换为OpenSSH的格式。此外,还演示了导出公钥和私钥的过程。

1万+

被折叠的 条评论
为什么被折叠?



