Ansible SSH fails in parallel with "banner exchange timeout" + port 65535 error | Works serially | Squid forward proxy in use

:red_exclamation_mark: Problem Summary:
After upgrading our forward proxy VM from Ubuntu 18.04 to 22.04 (Squid 3.5 → 5.9), all parallel SSH attempts via Ansible (more than 5 forks) are now failing intermittently with this error:

  msg: |
    Failed to connect to the host via ssh: Connection timed out during banner exchange
    Connection to UNKNOWN port 65535 timed out```

However, serial SSH or Ansible with -f 5 works fine.

This issue did not occur on the previous Ubuntu 18.04 setup.

:counterclockwise_arrows_button: What Was Changed (Upgrade Comparison):

Component Old VM (:white_check_mark: Working) New VM (:cross_mark: Failing in parallel)
OS Ubuntu 18.04.5 LTS (bionic) Ubuntu 22.04.5 LTS (jammy)
Kernel 5.4.0-1109-azure 6.8.0-1029-azure
Squid Version 3.5.27 5.9
OpenSSH (Client/Srv) 7.6p1 8.9p1
OpenSSL 1.1.1 3.0.2
MaxSessions in sshd 100 300 (configured)

:pushpin: No changes were made in sshd_config, firewall, or Ansible controller side — only the forward proxy VM was upgraded.

:magnifying_glass_tilted_left: What I Validated:

:white_check_mark: Manual parallel SSH test from forward proxy vm using the same inventory:

for i in {302..322}; do 
   ssh -i ansible ansible@host$i "hostname && sleep 60" & 
done

Edited → Now i tested in ubuntu 20 its working fine but not in 22
:right_arrow: All SSH connections succeed, hostnames print, and sleep runs — no drop.

:red_question_mark: Key Questions:

  1. Why is only Ansible pipeline failing? Manual SSH from same proxy works in parallel with full concurrency.
  2. Could there be Squid 5.9 or OpenSSH 8.9 change affecting handshake timing or concurrency?
  3. Why does SSH show failure on port 65535? Is this a symptom of connection exhaustion or proxy tunneling failure?
  4. Any sysctl or Squid tuning needed for large concurrent TCP tunnels in newer Ubuntu 22.04?
  5. Could OpenSSL 3.0.2 or kernel 6.8.0 be affecting ephemeral port reuse or TCP behavior?