Bitbucket known hosts fetch fails ssh request

Hey, I'm usingn AWS EC2 with security groups defined to allow requests from remote machines to my server.

While trying to fetch my server fingerprint in known hosts section, I receive an error saying that the SSH request fails. This is probably caused by my server not allowing the request.

I've tried adding api.bitbucket.org IP addresses defined here: https://confluence.atlassian.com/bitbucket/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall-343343385.html but the SSH request still fails.

What IP address does bitbucket use to make this request?

Thanks in advanced.

1 answer

1 accepted

0 vote

Hello @Imri Barr,

Is it failing due to IP address or port number?

I receive an error saying that the SSH request fails.

What is the error you are receiving? Could you please enable DEBUG and provide output so we can help you out?

# Windows
set GIT_TRACE_PACKET=1 set GIT_TRACE=1 set GIT_CURL_VERBOSE=1
git clone ....
# Linux or GitBash
export GIT_TRACE_PACKET=1 export GIT_TRACE=1 export GIT_CURL_VERBOSE=1
git clone ....

Are you able to SSH to Bitbucket?

ssh -v bitbucket.org

Kind regards,

Rafael

Hello @Imri Barr,

in What IP address does bitbucket use to make this request?

Bitbucket uses a range of ip addresses, as per mentioned in https://confluence.atlassian.com/pages/viewpage.action?pageId=847452940, so you are required to whitelist them.

Kind regards,

Rafael

Which ones of the IP list ranges should I use? I currently only inserted the api.bitbucket.com IP addresses.

Hello @Imri Barr,

Valid IP addresses for Bitbucket Pipelines services

You can use this IP range to whitelist requests made by Bitbucket Pipelines services (not your build environments) to external systems such as performing an SSH fingerprint lookup. Note that this IP range may also be used by other Atlassian systems in addition to Bitbucket Pipelines.

IPv4 Outbound

104.192.136.0/21

Kind regards,

Rafael

This is the IP I was looking for!

Thank you very much!

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

693 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot