Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

ssh: connect to host bitbucket.org port 22: Network is unreachable

Vamsi Mandadapu August 9, 2017

Hi,

i am trying to clone code bitbucket to git i am geting below error while using ssh it comes like that

same repo i am  using HTTPS it workes fine 

$ git clone git@bitbucket.org:punit_gupta/oodp_at_orlm.git
Cloning into 'oodp_at_orlm'...
ssh: connect to host bitbucket.org port 22: Connection timed out using 

some times it Shows access denied But that repo i am haveing Admin Aceess can you please tell me why i am getting this issuse and tell me how to fix this issue  

2 answers

2 votes
lumoura
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 9, 2017

Hi Vamsi,

Have you checked your firewall?

Please also check this.

If you use firewall this may be blocking your access when using the port 22.

You can check using the following command:


telnet bitbucket.org 22


Best regards,

 

Lucas de Moura 

Vamsi Mandadapu August 9, 2017

Hi Lucas,

 

Thanks for the Quick reply, i run this telnet command on git 

telnet bitbucket.org

Capture11.PNG

 

i will get output like this, can u please tell me proper way how to check.

Thanks for the Advance,

Vamsi Mandadapu

Like # people like this
lumoura
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 9, 2017

Hey Vamsi,

 

This command is intended to be run in your terminal. You don`t need to necessary run it in your git directory.

This output means that you do not have the "telnet" installed.

 

Have you checked if there is a firewall in your network/computer?

Like matkelm2 likes this
Vamsi Mandadapu August 9, 2017

Hi Lucas,

yes i have windows firewall on my system, may be that is the reason i am not able clone while using ssh.

if i am using my company network it's not working. i am using my public network it's work fine.

i guess problem with internal network only (it's correct)

Capture111.PNG

lumoura
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 9, 2017

Good to know that together we get to the answer of the problem.

Vamsi Mandadapu August 9, 2017

Yes Lucas, thanks for the clarrfication.

i need small information can u tell me how to enable port numbers on firewall security,

i thick it is out of the Question :)

to enable port number 22,can u please share any document you already have 

Regards,

vamsi

Like Garth Mountain likes this
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 9, 2017

You'd need to talk to your network team to alter your local settings. However, you should be able to get to Bitbucket using SSH on a non-standard port:

`git remote set-url origin ssh://git@altssh.bitbucket.org:443/owner/repo.git`

Port 443 is normally used for HTTPS, but for that specific hostname (`altssh.bitbucket.org`) it gets routed to our SSH servers.

Like # people like this
Vamsi Mandadapu August 9, 2017

HI Lucas,

i run telnet bitbucket.org 22  i am geeting  error message like this

telnet.PNGCould not open connection to the host, on port 22: Connect failed

Like Bartosz Stępień likes this
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 9, 2017

Just curious, but who's your ISP? I'm seeing reports that BSNL has blocked all outbound access on port 22, which would explain this sort of error. If that's the case, then you'll need to talk to BSNL - but you can still use altssh.bitbucket.org:443 or HTTPS to push, pull, and do other things in the meantime.

Like # people like this
ajaypeter August 29, 2019

Any update on this, @jredmond @lumoura @Vamsi Mandadapu ?

jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 4, 2019

There are no updates we can provide: this is something either in your network or in your ISP's network. (To put it another way: if bitbucket.org:22 were down, then I wouldn't have time to respond here because we'd be in the middle of a major incident.)

Like ajaypeter likes this
ajaypeter September 5, 2019

Thanks @jredmond (working on it internally) I'll update here if an internal solution is found.

Vladimir_Vukanac April 26, 2020

On Mac instead of `telnet` run

```bash
$ nc -vz bitbucket.org 22
nc: connectx to bitbucket.org port 22 (tcp) failed: Connection refused

$ nc -vz bitbucket.org 443
Connection to bitbucket.org port 443 [tcp/https] succeeded!
```

Like Letty likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events