SSH connection to the ESXi host fails
search cancel

SSH connection to the ESXi host fails

book

Article ID: 435093

calendar_today

Updated On:

Products

VMware vSphere ESX 8.x

Issue/Introduction

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."

Environment

vSphere ESXi 8.x

Cause

This was caused by the Unix domain socket buffer size being set to a value lower than the default (64 KB).

Resolution

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
        
        #

Additional Information

Japanese version: ESXi ホストへの ssh 接続が失敗する