ssh:连接到主机bitbucket.org端口22:连接超时致命 [英] ssh: connect to host bitbucket.org port 22: Connection timed out fatal
本文介绍了ssh:连接到主机bitbucket.org端口22:连接超时致命的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
整个错误是:
ssh: connect to host bitbucket.org port 22: Connection timed out
fatal: The remote end hung up unexpectedly
当我从位于不同服务器(国家/地区)上的两个项目中推送时,出现了此错误.
I'm getting this error when I do push from two of my projects which are on different servers (countries).
可能是什么问题?
更新:
使用
ssh -v
我得到这个:
usage: ssh [-somecode] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-e escape_char] [-F configfile]
[-i identity_file] [-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[-w tunnel:tunnel] [user@]hostname [command]
推荐答案
检查您是否没有用于ssh传出连接的iptable规则,
如果为true,则添加端口22.
对于多个端口:
check if you don't have iptable rules for ssh outgoing connections,
if true, add port 22.
For multiple ports:
iptables -t filter -A OUTPUT -p tcp --match multiport --dport 22,1111,2222,3333 -j ACCEPT
这篇关于ssh:连接到主机bitbucket.org端口22:连接超时致命的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文