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

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

book

Article ID: 326317

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

  • Connecting to vCenter Server Virtual Appliance 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 Appliance (VCSA) using SCP tools like WinSCP, or PSCP for example, fails with the error:
    Host is not communicating for more than 15 seconds. If the problem repeats, try turning off 'Optimize connection buffer size'.

Environment

VMware vCenter Server Appliance 6.0.x
VMware vCenter Server Appliance 6.5.x
VMware vCenter Server Appliance 6.7.x
VMware vCenter Server 7.0.x
VMware vCenter Server 8.0.x

Cause

When you copy files using WinSCP, part of the operation happens on the target Linux system. The default Appliance Shell cannot be the remote partner of WinSCP.

Resolution

 You must enable the Bash shell on the appliance, as follows:

  1. Initiate an SSH connection to the vCenter Server Appliance.
     

  2. Provide the root user user name and password when prompted.
     

  3. Run this command to enable the BASH shell, if you are using vCenter Server 6.0. On For vCSA 6.5,6.7 and 7.0 this is no longer needed:


    # shell.set --enable True

     

  4. Run this command to access the Bash shell:


    # shell

     

  5. In the Bash shell, run this command to change the default shell to Bash:
     

    # chsh -s /bin/bash root


    Note: If you get the following message, it indicates the root password has expired:

    root@myvcsa [ ~ ]# chsh -s /bin/bash root
    You are required to change your password immediately (root enforced)
    chsh: PAM: Authentication token is no longer valid; new one required

        
    If this happens, run the following command to check if the root password has expired:

    # chage -l root

                
    When the password is expired, you will see the following output:

    chage -l root
    You are required to change your password immediately (root enforced)
    chage: PAM: Authentication token is no longer valid; new one required


    To fix this, you need to change the root password using passwd command:

    # passwd root

    Then verify the root account password has been changed and is no longer expired:

    # chage -l root

    Minimum: 0
    Maximum: 365
    Warning: 7
    Inactive: -1
    Last Change: Feb 03, 2020
    Password Expires: Feb 03, 2021
    Password Inactive: Never
    Account Expires: Never

                
    Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.
     

  6. You can now use SCP (e.g. WinSCP, SCP command line, PSCP on Linux etc.) to upload or download files from the vCenter Server Appliance.
     

  7. To switch the default shell back to the Appliance Shell, run this command:

    # chsh -s /bin/appliancesh root