美文网首页
ssh: connect to host ssh.github.

ssh: connect to host ssh.github.

作者: __jy | 来源:发表于2020-02-11 13:18 被阅读0次

已经反复多次遇到这个问题


image.png

如何解决

【前提进入当前文件目录下!!!而非根目录】
输入命令 vim ~/.ssh/config

Host github.com
User YourEmail@xx.com
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

  1. ia 进入编辑模式
  2. 复制上面
  3. esc退出编辑
  4. :wq保存退出

输入命令 ssh -T git@github.com

image.png

成功!

相关文章

网友评论

      本文标题:ssh: connect to host ssh.github.

      本文链接:https://www.haomeiwen.com/subject/ixfxfhtx.html