1.进入到C:\Users\dell\.ssh
右键打开Git Bash Here
2.ssh-keygen -t rsa
然后直接点击 enter enter enter

3.查看id_rsa.pub上传公钥到服务器
输入 cat id_rsa.pub

然后从ssh-rsa 全部复制,到服务器上,就可以使用git ssh
todo:多个ssh增强版
https://help.github.com/articles/connecting-to-github-with-ssh/
checking for existing ssh keys
ls -al ~/.ssh
github generating a new SSH key
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
chose different name
enter
Adding yout SSH key to ssh-agent
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
Add the SSH key to GitHub Account
Windows .ssh config
Host github.com
HostName ssh.github.com
Port 443
#Host gitlab.com
Host 192.168.100.100
RSAAuthentication yes
IdentityFile ~/.ssh/mail_rsa
User montotone
AWS config
Host git-codecommit.*.amazonaws.com
User APKAJHAXILU5XNXVOW2Q
IdentityFile ~/.ssh/id_rsa
Testing your connection to github
ssh -T git@github.com
local gitlab
ssh -T git@192.168.100.100
本文详细介绍了如何在本地计算机上生成SSH密钥,并将其添加到Git服务器中,以实现无密码克隆和推送代码。此外,还介绍了如何为不同的服务器配置多个SSH密钥,以及如何在Windows环境下设置SSH连接。

492

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



