connect to host ssh.github.com port 22: Connection timed out解决方法
2017-08-08 14:29
891 查看
今天在做本地密钥与GitHub公钥配对用ssh -T Git@github.com命令测试是否成功时提示ssh:
connect to host github.com port 22: Bad file number
运行环境:Win7旗舰版
可能是端口的问题
在网上也看到关于这个问题的提问,说可能是端口被防火墙什么的阻塞了。
解决办法:
在 /C/User/UserName/.ssh目录下创建个文件名为config的文件,
用文本编辑器打开,写入以下配置,保存关闭,
[plain] view
plain copy
Host github.com
User git
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
回到命令行窗口再运行ssh -T git@github.com命令,会询问你是否要继续连接,输入yes回车,
如果看到“Hi 你的GitHub名! You've successfully authenticated, but GitHub does not provide shell access.”就表示成功,
虽然有个警告,这个GitHub上有人说这个只要IP是在192.30.252.0到192.30.255.255之间的话是没关系的。
connect to host github.com port 22: Bad file number
运行环境:Win7旗舰版
可能是端口的问题
在网上也看到关于这个问题的提问,说可能是端口被防火墙什么的阻塞了。
解决办法:
在 /C/User/UserName/.ssh目录下创建个文件名为config的文件,
用文本编辑器打开,写入以下配置,保存关闭,
[plain] view
plain copy
Host github.com
User git
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
回到命令行窗口再运行ssh -T git@github.com命令,会询问你是否要继续连接,输入yes回车,
如果看到“Hi 你的GitHub名! You've successfully authenticated, but GitHub does not provide shell access.”就表示成功,
虽然有个警告,这个GitHub上有人说这个只要IP是在192.30.252.0到192.30.255.255之间的话是没关系的。
相关文章推荐
- 解决ssh-connect-to-host-github-com-port-22-connection-timed-out
- 解决ssh-connect-to-host-github-com-port-22-connection-timed-out
- 解决ssh-connect-to-host-github-com-port-22-connection-timed-out
- ssh: connect to host github.com port 22: Connection timed out
- SSH连接GitHub出现 ssh: connect to host github.com port 22: Connection refused解决方法
- 2.git 连接报"ssh: connect to host github.com port 22: Connection timed out"错误
- git clone时出现ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from
- 解决ssh: connect to host gitlab.com port 22: Connection timed out
- ssh: connect to host github.com port 22: Connection timed out
- github连接报"ssh: connect to host github.com port 22: Connection timed out"错误
- github连接报"ssh: connect to host github.com port 22: Connection timed out"错误
- Git配置非22端口,解决:ssh: connect to host xxx port 22: Connection timed out fatal: The remote end hung up unexpectedly
- Git克隆提交出现“ssh: connect to host github.com port 22: Operation timed out fatal”问题
- GIT报错:connect to host github.com port 22: Connection timed out
- 【解决】ssh: connect to host slave port 22: Connection timed out的问题
- 解决 connect to host github.com port 22 operation timed out
- 解决ssh: connect to host 107.21.95.3 port 22: Connection timed out
- localhost: ssh: connect to host localhost port 22: Connection timed out
- GitHub上传不了的解决 ssh: connect to host github.com port 22
- mac 配置 ssh 到git (Could not resolve hostname github.com, Failed to connect to github.com port 443 Operation timed out)