I was having trouble with git pull/push commands hanging intermittently. Trying to get to the root cause I ran ssh -T git@bitbucket.org. Sometimes it says I've been authenticated successfully and sometimes it just hangs. This leads me to believe my SSH key is set up properly so I'm not sure what would cause it to randomly not work and then start working again. As a side note, ssh -T git@github.com comes back successfully and never hangs, so I don't think it's some general SSH problem with my machine or network.
As I was writing this, one of the ssh -T git@bitbucket.org commands just came back but it took quite a while, on the order of minutes. Can anyone shed some light as to why it is so slow to respond for me?
EDIT: I ran ssh -Tvv git@bitbucket.org and I see the following: debug1: connect to address 2401:1d80:1010::150 port 22: Connection timed out
After that it looks like it attempts to connect again: debug1: Connecting to bitbucket.org [104.192.143.3] port 22. this time the connection is established immediately