github链接报"ssh: connect to host github.com port 22: Connection timed out"错误

1. 异常


在链接github时,执行”ssh -T Git@github.com” 命令时,出现github

ssh: connect to host github.com port 22: Connection timed out

 

2. 解决方法


在存放公钥私钥(id_rsa和id_rsa.pub)的文件里,新建config文本,内容以下:markdown

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

 

其中User为登陆github的帐号名称。 
再次执行”ssh -T git@github.com”时,会出现提示以下,回车”yes”便可。 
这里写图片描述 
这时验证就能够经过。 
这里写图片描述ssh

 

 

文章转载至:http://blog.csdn.net/vosang/article/details/50499300spa

相关文章
相关标签/搜索