$ ssh -T git@github.com ssh: connect to host ssh.github.com port 22: Connection timed out

在C:/用户/用户名/.ssh中添加几个文件

之前的电脑生成都是四个文件,分别是 id_rsa  id_rsa.pub  config known_hosts

不知道为什么在另一台电脑上却生成两个文件  id_rsa  id_rsa.pub

原来这两个文件也能使用,只不过最近在研究git,发现clone失败,SSH key不能连接。

无奈只能添加两个文件如下:

config

Host github.com
    User git
    Hostname ssh.github.com
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/id_rsa
    Port 443

至于另一个文件需不需要我也不清楚

原文地址:https://www.cnblogs.com/wy1935/p/7210961.html