【问题标题】:WinScp: Connection has been unexpectedly closed. server sent command exit status 127WinScp:连接已意外关闭。服务器发送命令退出状态 127
【发布时间】:2019-01-22 07:41:43
【问题描述】:

我的服务器是 Ubuntu 14.04.5 LTS,我可以在 Putty 中连接 SSH,但无法通过 WinSCP 连接。

当我尝试通过 WinSCP 连接时,出现以下错误:

连接已意外关闭。服务器发送命令退出状态 127

【问题讨论】:

标签: ssh winscp


【解决方案1】:

要从其他主机访问您的 sftp,请确保已正确安装和配置以下内容。

  • 已安装 OpenSSH 服务器
  • 已配置 sshd_config
    • PubkeyAuthentication 是
    • 子系统 sftp internal-sftp
  • 已将您的公钥添加到 ~/.ssh/authorized_keys

  • 启动 ssh 服务器并打开端口 22/TCP # /etc/init.d/sshd start

  • # iptables -I INPUT -j ACCEPT -p tcp --dport 22

最后,测试 $ sftp <login>@<hostname>

【讨论】:

    猜你喜欢
    • 2021-12-23
    • 2018-08-25
    • 2019-05-31
    • 2012-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多