ssh: connect to host bitbucket.org port 22: Connection timed out fatal
11,475
Solution 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
Solution 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
Comments
-
iWizard almost 2 years
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]
-
Maxim over 9 yearsWhat if 3rd statement is false?
-
A. Sallai over 8 yearsIt did work for me but can you please explain what this really does?
-
Mario Fink over 4 yearsThat worked nicely. However I had to remove the backtick after the port number 443 (on MacOS).
-
Mark Aroni over 4 yearsWell spotted, that shouldn't have been in there, I have edited and removed it now, thanks
-
Mark Aroni almost 2 yearsIt would have been better to suggest checking their status page bitbucket.status.atlassian.com