ssh: connect to host github.com port 22: Connection timed out
程序员文章站
2024-03-14 09:04:16
...
安装的git版本如下:
今天在添加SSH key到github时出现以下错误:
解决方法如下:
- 找到git的安装目录,找到/etc/ssh/ssh_config文件:
- 打开后,在末尾增加以下内容:
Host github.com
User git
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
然后:
就成功了。
推荐阅读
-
ssh:connect to host localhost port 22: Connection refuse解决
-
master: ssh: connect to host master port 22: Connection refused
-
ssh: connect to host ip port 22: Network is unreachable
-
ssh: connect to host 10.224.120.107 port 22: No route to host
-
ubuntu: ssh: connect to host ubuntu port 22: No route to host
-
ssh: connect to host github.com port 22: Connection timed out
-
ssh: connect to host gitlab.com port 22: Connection timed out
-
Ubuntu SSH - ssh: connect to host ****** port 22: Connection refused
-
ssh: connect to host github.com port 22: Connection timed out的解决方法
-
Mac中git报错ssh: connect to host github.com port 22: Connection timed out