Can't setup SSH connection to a repo in Bitbucket server

I have installed Bitbucket server behind nginx. Everything is working except SSH connections to my repository. If i try: 

git clone ssh://

I am getting the following error:

Cloning into 'news'...
ssh: connect to host port 7999: Operation timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

I have successfully enabled SSH in the settings page:

If i try to connect without mentioning port 7999 i am asked for a password, but none of them works. My Bitbucket server works behind nginx.

1 answer

1 accepted

0 vote
Jeff Thomas Atlassian Team Nov 01, 2016

Is port 7999 open on the server? You may have a firewall rule that prevents connections on that port. 

What do you get when you run the following?

ssh -p 7999 whoami 

I am getting timeout. But if i do that on a host machine i get permission denied (public key). So i've installed haproxy, but cannot set it up... god..

Jeff Thomas Atlassian Team Nov 01, 2016

I just commented on the Stack Overflow question, try adding "mode tcp" to the front end. It seems to be defaulting to http.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
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...

2,001 views 1 5
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