vCenter Server で SCP コマンドが "Unknown Command : scp" で失敗する
search cancel

vCenter Server で SCP コマンドが "Unknown Command : scp" で失敗する

book

Article ID: 433549

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

免責事項:これは英文の記事「SCP command fails with "Unknown Command : scp" on vCenter Server Appliance」の日本語訳です。記事はベストエフォートで翻訳を進めているため、ローカライズ化コンテンツは最新情報ではない可能性があります。最新情報は英語版の記事で参照してください。

scp コマンドや自動化スクリプト(sshpass など)を使用して vCenter Server Appliance からファイルを転送しようとすると、処理が失敗します。

  • コマンド例:
    sshpass -p 'vCenter_Server_root_password' scp root@<vCenter_IP_OR_FQDN>:/var/log/audit/sso-events/audit_events.log /local_destination/
  • エラーメッセージ: 
    Unknown Command: scp
  • vCenter の SSH セッション内で echo $SHELL を実行すると /bin/appliancesh と表示される。

Environment

VMware vCenter Server 8.0.x

Cause

vCenter Server Appliance のデフォルト シェルが Appliance Shell (/bin/appliancesh) に設定されているためです。ここでは標準的な Linux の scp コマンドをサポートしていません。

Resolution

この問題を解決するには、一時的または恒久的に Bash シェル(/bin/bash)に切り替えます。詳細については、「Toggling the vCenter Server Appliance default shell」内の "Switching the vCenter Server Appliance to BASH 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
SCP command fails with "Unknown Command : scp" on vCenter Server Appliance