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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

My ubuntu 16.04 can't reach on port 22. It never reply. Edited

Hi guys!


I have a problem with a configuration of a server (that until wendesey worked charmly without me doing anything!) 

Since yesterday, when I try to do git pull or any other try to connect to, it' never reply. It just stay on waiting until the...end of the world I guess.

Here is some example:

telnet 22

Return only this: 

Trying 2406:da00:ff00::22e9:9f55...


The ssh try commnads: ssh -v

Return this:

OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to [2406:da00:ff00::22c0:3470] port 22.


I don't have ufw activated, the firewall on plesk (I'm using plesk odin) doesn't have any rules about bitbucket. I don't have other firewalls to check (I guess). I tried to clone for other ssh repository (example: and it works. I am 100% sure that isn't a bitbucket problem, but maybe you could help me figure out what can cause this problem?


And, forgot to say: Other servers located in the same place of this ones, has no problem conntectin to bitbucket, the server is located in germany and I don't think it's a network connection problem.

1 answer

1 accepted

1 vote
Answer accepted

Hello @paolocargnin,

Hm, this seems to be an issue with IPv6. SSH prefers IPv6 if it got AAAA record from DNS server. Can you check if it was using IPv6 in the past? Maybe there was some update recently, but IPv6 isn't properly supported by the ISP?

Can you try forcing SSH to use IPv4? Like this:

ssh -v -4

Hope this helps.


Omg in this way itworks like a charm! 

Buuuuut, how can I use it with git? 

I can think of following options for a permanent fix, starting from least intrusive:

  • modify SSH command just for Git to enforce IPv4, see git-config
  • enforce IPv4 for SSH by adding a property AddressFamily inet to /etc/ssh/sshd_config
  • disable IPv6 on your machine entirely. I'm not sure about the preferred way of doing this on Ubuntu.
Like paolocargnin likes this

Didnt' find a way to do that with git-config. 

I used the second method and worked like a charm ;) 


Thank you very much @Daniil Penkin !

Like Daniil Penkin likes this

No worries, always happy to help.

One of the ways to set it just for Git:

git config --global --add core.sshCommand "ssh -4"


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

150 views 0 2
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you