一、Generating a new SSH key
Open Git Bash.
Paste the text below, substituting in your GitHub email address.
ssh-keygen -t rsa -b 4096 -C "[email protected]"
// 输入这句话,连按三个回车,直接跳过下面的步骤
This creates a new ssh key, using the provided email as a label.
Generating public/private rsa key pair.
When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.
Enter a file in which to save the key (/c/Users/you/.ssh/id_rsa):[Press enter]
At the prompt, type a secure passphrase. For more information, see .
Enter passphrase (empty for no passphrase): [Type a passphrase] Enter same passphrase again: [Type passphrase again]
二、安装完成之后,输入命令 ll ~/.ssh
查看是否安装成功,出现 id_rsa
(锁) 和 id_rsa.pub
(钥匙) 成功
三、出现锁之后,我们输入命令cat ~/.ssh/id_rsa.pub
查看内容并上传github
四、创建完成之后我们可以测试一下
如果之前已经存在,输入命令rm ~./ssh/known_hosts
删除之前的连接
输入命令测试连接
ssh -T [email protected]
输入yes
作者:littleyu
链接:https://www.jianshu.com/p/3ba81ffd5046
點擊查看更多內容
為 TA 點贊
評論
評論
共同學習,寫下你的評論
評論加載中...
作者其他優質文章
正在加載中
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦