生成ssh密钥与公钥

粘贴以下文本,将示例中使用的电子邮件替换为 GitHub 电子邮件地址。

Bash
ssh-keygen -t ed25519 -C "me@luola.me"

使用私钥生成公钥

Bash
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub

~/.ssh/id_rsa 是已有私钥的路径 ~/.ssh/id_rsa.pub 是生成公钥的路径

将已有私钥添加进ssh私钥链

Bash
ssh-add  ~/.ssh/id_ed25519