Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

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


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"




cc,c nc

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,160 views 2 9
Read article

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