ssh: connect to host bitbucket.org port 22: Connection timed out fatal

三世轮回 提交于 2019-12-22 06:56:05

问题


Whole error is:

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).

What could be problem?

UPDATE:

Using

ssh -v

I'm getting this:

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]

回答1:


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



回答2:


This may get it working again

edit the ssh config file:

nano ~/.ssh/config

make sure you have these lines:

Host bitbucket.org
 Hostname  altssh.bitbucket.org
 Port  443



回答3:


check if bitbucket is down

  1. Open Browser
  2. Go to http://www.bitbucket.org
  3. If the page doesn't display, it means bitbucket is down.

Solution: Wait for it :)



来源:https://stackoverflow.com/questions/17826622/ssh-connect-to-host-bitbucket-org-port-22-connection-timed-out-fatal

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!