Tiup cluster check error: cause: ssh: handshake failed: read tcp: read: connection reset by peer

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tiup cluster check报错cause: ssh: handshake failed: read tcp : read: connection reset by peer

| username: allens

[TiDB Usage Environment] Production Environment
[TiDB Version] 7.5.0
[Reproduction Path] Expand nodes using tiup, execute pre-expansion check

tiup cluster check tidb-c1 ./scalout.yaml --cluster --user dba -p -i /home/dba/.ssh/id_rsa

[Encountered Problem: Phenomenon and Impact]
Error reported when executing tiup cluster check:

Error: stderr: : executor.ssh.execute_failed: Failed to execute command over SSH for 'dba@10.1.4.44:22' {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin; /usr/bin/sudo -H bash -c "tar --no-same-owner -zxf /tmp/tiup/bin/insight-v0.4.2-linux-amd64.tar.gz -C /tmp/tiup/bin && rm /tmp/tiup/bin/insight-v0.4.2-linux-amd64.tar.gz"}, cause: ssh: handshake failed: read tcp 10.1.4.30:12180->10.1.5.44:22: read: connection reset by peer

I have checked multiple related posts, all suggesting parameter adjustments, such as: TiUP FAQ, TIKV multiple disks ssh connection reset by peer
I have adjusted the parameters in /etc/ssh/sshd_config on all nodes to:

MaxSessions 10000
MaxStartups 10000

But the error persists

[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page

[Attachments: Screenshots/Logs/Monitoring]
tiup-cluster-debug-2024-06-20-18-00-44.log (39.3 KB)