WinSCP connection to vCenter Server Virtual Appliance fails with "Received too large SFTP packet" error - VMware vCenter Server
search cancel

WinSCP connection to vCenter Server Virtual Appliance fails with "Received too large SFTP packet" error - VMware vCenter Server

book

Article ID: 326317

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Connecting to vCenter Server using WinSCP fails with the error:
    Received too large (1433299822 B) SFTP packet. Max supported packet size is 1024000 B

  • Attempting to upload a file to the vCenter Server using the SCP protocol via WinSCP, PSCP or other SCP clients fail with the error:
    Host is not communicating for more than 15 seconds. If the problem repeats, try turning off 'Optimize connection buffer size'

  • Encountering an error while attempting to SCP into vCenter via the command line.
    scp: Received message too long 1433299822
    scp: ensure the remote shell produces no output for non-interactive sessions.

Environment

VMware vCenter Server

Cause

  • When using WinSCP, part of the operation occurs on the target system. The default Appliance Shell cannot be the remote partner of WinSCP.

  • By default, VCSA is set to Appliance Shell, but SCP requires Bash shell.

Resolution

There are 2 ways to resolve this issue.

Option 1:

Adjust the WinSCP advanced settings as follows:

  1. Open Advanced settings in WinSCP.

  2. Select SFTP.

  3. In SFTP server, replace the default value with: shell /usr/libexec/sftp-server

Note: This method is safer than Option 2 of changing the vCenter bash shell, as it avoids risks associated with modifying Photon OS settings.

 

Option 2:

Enter the vCenter appliance in Bash shell from CLI using below command:
chsh -s  /bin/bash root

Note: If using this option, change should be reverted back with default shell updated to /bin/appliancesh after the file transfer to maintain the security posture of the vCenter appliance.

Additional Information

How to upload or download files to or from vCenter and ESXi hosts