I've mounted an EC2 instance based on Ubuntu LTS 16.4.
Instance is in a VPC and has IPv4 and IPv6 assigned. Security group allows output towards any IP address for IPv4 and v6 on port 22. (Same security group as other instances working fine with IPv6)
However, when I try to connect to BitBucket, IPv6 connection fails and only IPv4 works:
ssh -vvv -T git@bitbucket.org
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "bitbucket.org" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to bitbucket.org [2406:da00:ff00::22c2:513] port 22.
debug2: fd 3 setting O_NONBLOCK
debug1: connect to address 2406:da00:ff00::22c2:513 port 22: Connection timed out
debug1: Connecting to bitbucket.org [2406:da00:ff00::22c5:2ef4] port 22.
debug1: connect to address 2406:da00:ff00::22c5:2ef4 port 22: Connection timed out
debug1: Connecting to bitbucket.org [2406:da00:ff00::6b17:d1f5] port 22.
debug1: connect to address 2406:da00:ff00::6b17:d1f5 port 22: Connection timed out
debug1: Connecting to bitbucket.org [18.205.93.1] port 22.
debug1: Connection established.
As you can see, only IPv4 works.
I've triple-checked AWS config, but since it's the same as I use for others EC2 which works perfectly fine with Bitbucket in IPv6 mode, I think there is «something» wrong in my Ubuntu/network config.
Any idea where I can look ?