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

链接GitHub服务器时报错

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

可通过以下方法解决问题

1,打开 ~./ssh 目录

2,找到 config 文件,如果没有,通过 touch config 创建文件

3,打开 config 文件,将以下内容复制到该文件中

Host github.com
  HostName ssh.github.com

4,保存,重新运行ssh命令即可

我的笔记