SCP command fails with "Unknown Command : scp" on vCenter Server Appliance
search cancel

SCP command fails with "Unknown Command : scp" on vCenter Server Appliance

book

Article ID: 432354

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When attempting to transfer files from a vCenter Server Appliance using the scp command or automated scripts (e.g., via sshpass), the operation fails.

  • Example command:
    sshpass -p 'vCenter_Server_root_password' scp root@<vCenter_IP_OR_FQDN>:/var/log/audit/sso-events/audit_events.log /local_destination/
  • Error message: 
    Unknown Command: scp
  • Running "echo $SHELL" within the vCenter Server SSH session returns /bin/appliancesh.

Environment

VMware vCenter Server 8.0.x

Cause

The default shell on the vCenter Server Appliance is the Appliance Shell (/bin/appliancesh). It does not support standard Linux scp file transfer commands.

Resolution

To resolve this, switch to the Bash shell (/bin/bash) either temporarily or permanently. For details, see the "Switching the vCenter Server Appliance to BASH Shell" section in Toggling the vCenter Server Appliance default shell.

Additional Information

Toggling the vCenter Server Appliance default shell
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
vCenter Server で SCP コマンドが "Unknown Command : scp" で失敗する