使用 WinSCP 将文件上载到 vCenter Server Appliance 时出错
search cancel

使用 WinSCP 将文件上载到 vCenter Server Appliance 时出错

book

Article ID: 344062

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:
免责声明:本文为 Error when uploading files to vCenter Server Appliance using WinSCP (2107727) 的翻译版本。尽管我们会不断努力为本文提供最佳翻译版本,但本地化的内容可能会过时。有关最新内容,请参见英文版本。
  • 尝试使用 WinSCP 将证书文件上载到 vCenter Server Appliance 失败
  • 您会看到以下错误:

    主机通信时间不足 15 秒。如果问题重复出现,请尝试关闭“优化连接缓冲区大小”(Host is not communicating for more than 15 seconds.If the problem repeats, try turning off 'Optimize connection buffer size')。


Environment

VMware vSphere ESXi 6.0
VMware vCenter Server 6.0.x
VMware vCenter Server Appliance 6.0.x
VMware vCenter Server Appliance 6.5.x

Resolution

当您使用 WinSCP 复制文件时,部分操作发生在目标 Linux 系统上。默认的 Appliance Shell 不能是 WinSCP 的远程合作伙伴。您必须启用设备上的 Bash shell,如下所示:
  1. 发起与 vCenter Server Appliance 的 SSH 连接。
  2. 提示时,提供 root 用户的用户名和密码。
  3. 运行以下命令以启用 Bash shell:

    shell.set --enable True

  4. 运行以下命令以访问 Bash shell:

    shell

  5. 在 Bash shell 中,运行以下命令将默认 shell 更改为 Bash:

    chsh -s /bin/bash root

  6. 使用 WinSCP 将证书文件上载到 vCenter Server Appliance。
  7. 要返回到 Appliance Shell,请运行以下命令:

    chsh -s /bin/appliancesh root
您也可以使用 PSCP 将文件从 Linux 系统复制到 vCenter Server Appliance。在 Linux 上,将在本地运行命令并成功完成传输。


Additional Information

Error when uploading files to vCenter Server Appliance using WinSCP