Post

如何配置 SSH 密钥

生成 SSH Key:

1
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

添加 SSH Key 到 SSH 代理:

1
2
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

复制 SSH 公钥:

1
cat ~/.ssh/id_rsa.pub

添加至 Github;
添加至服务器:

1
ssh-copy-id -i ~/.ssh/id_rsa.pub username@serverIP
This post is licensed under CC BY 4.0 by the author.