Details
Attempting to upload a file to the vCenter Server Appliance (VCSA) using SCP tools like WinSCP, or PSCP for example, fails
You see the following error: Host is not communicating for more than 15 seconds. If the problem repeats, try turning off 'Optimize connection buffer size'.
Solution
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. You must enable the Bash shell on the appliance, as follows:
Initiate an SSH connection to the vCenter Server Appliance.
Provide the root user user name and password when prompted.
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
Run this command to access the Bash shell:
# shell
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.
You can now use SCP (e.g. WinSCP, SCP command line, PSCP on Linux etc.) to upload the files to the vCenter Server Appliance.
To switch the default shell back to the Appliance Shell, run this command: # chsh -s /bin/appliancesh root