title: git clone using ssh connection fails "Connection reset by <server_IP> port 7999"
body: <p>I want to clone bitbucket repository using ssh authentication as cloning through https method gives connection timed out error for one of my repository which is 1Gb+ in storage.</p>
  <p>I generated ssh keys using &quot;ssh-keygen&quot; on windows client, public key (id_rsa) is added to my bitbucket account. Settings --&gt;Manage Account ---&gt; SSH keys</p>
  <p>Bitbucket DataCenter is hosted on Azure linux(Ubuntu) vm, default ssh port 7999 is whitelisted on azure firewall for my machine ip and there is no internal firewall activated on linux server.</p>
  <p>My account is having system admin rights.</p>
  <p><strong>git clone ssh://git@serverURL:7999/dem/projectname.git</strong></p>
  <p><strong>Error Message:</strong></p>
  <pre><code>Cloning into 'projectname'...
  kex_exchange_identification: read: Connection reset by peer
  Connection reset by Server_ip port 7999
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.  
  </code></pre>
  <p>Also I tried adding &quot;sshd: mySystem_IP&quot; in /etc/hosts.allow on bitbucket server still getting the same error.</p>
  <p>Has anyone faced similar kind of issue? Not sure what am I missing in the configuration here. Thank you for your time!</p>
  <p><strong>Debug using ssh -vT:</strong></p>
  <pre><code>ssh -vT ssh://git@bitbucket_url.com:7999
  OpenSSH_8.8p1, OpenSSL 1.1.1l 24 Aug 2021
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: Connecting to Server_IP port 7999.
  debug1: Connection established.
  debug1: identity file /c/Users/user_name/.ssh/id_rsa type 0
  debug1: identity file /c/Users/user_name/.ssh/id_rsa-cert type -1
  debug1: identity file /c/Users/user_name/.ssh/id_dsa type -1
  debug1: identity file /c/Users/user_name/.ssh/id_dsa-cert type -1
  debug1: identity file /c/Users/user_name/.ssh/id_ecdsa type -1
  debug1: identity file /c/Users/user_name/.ssh/id_ecdsa-cert type -1
  debug1: identity file /c/Users/user_name/.ssh/id_ecdsa_sk type -1
  debug1: identity file /c/Users/user_name/.ssh/id_ecdsa_sk-cert type -1
  debug1: identity file /c/Users/user_name/.ssh/id_ed25519 type 3
  debug1: identity file /c/Users/user_name/.ssh/id_ed25519-cert type -1
  debug1: identity file /c/Users/user_name/.ssh/id_ed25519_sk type -1
  debug1: identity file /c/Users/user_name/.ssh/id_ed25519_sk-cert type -1
  debug1: identity file /c/Users/user_name/.ssh/id_xmss type -1
  debug1: identity file /c/Users/user_name/.ssh/id_xmss-cert type -1
  debug1: Local version string SSH-2.0-OpenSSH_8.8
  kex_exchange_identification: read: Connection reset by peer
  Connection reset by Server_IP port 7999
  </code></pre>