SSH connections to the ESXi host fail as shown below.
# ssh XX.XX.XX.XX
kex_exchange_identification: Connection closed by remote host
Connection closed by XX.XX.XX.XX port 22
#
The auth.log file on the ESXi host contained the following output: "fatal: send_rexec_state: setsockopt SO_SNDBUF: File too large."
vSphere ESXi 8.x
This was caused by the Unix domain socket buffer size being set to a value lower than the default (64 KB).
After logging into ESXi via the console, execute the following commands.
1. Set to the default value (64 KB)
# localcli system settings advanced set -o /Misc/UserSocketUnixMaxBufferSize -i 65536
2. Verify the setting
# localcli system settings advanced list -o /Misc/UserSocketUnixMaxBufferSize
Ex)
# localcli system settings advanced list -o /Misc/UserSocketUnixMaxBufferSize
SettingsAdvancedOption:
Path: /Misc/UserSocketUnixMaxBufferSize
Type: integer
Int Value: 65536 <------
Default Int Value: 65536
Min Value: 0
Max Value: 131072
String Value:
Default String Value:
Valid Characters:
Description: Max buffer size for UW Unix domain sockets (bytes)
Host Specific: false
Impact: none
#
Japanese version: ESXi ホストへの ssh 接続が失敗する