scp 到运行 Microsoft OpenSSH 服务器端口的 Windows2012Server,失败并显示“管道损坏”

scp 到运行 Microsoft OpenSSH 服务器端口的 Windows2012Server,失败并显示“管道损坏”

刚刚安装微软支持的 OpenSSH Window 端口并且它对于来自 Linux 客户端的 ssh 会话非常有效:

andrew@debian:~$ ssh 55.55.55.55
The authenticity of host '55.55.55.55 (55.55.55.55)' can't be established.
ECDSA key fingerprint is SHA256:oPx2UbDPJakzpAuiTyMDJI6oDExifs5crCbXIrClgxA.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '55.55.55.55' (ECDSA) to the list of known hosts.
[email protected]'s password: 
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

andrew@TEST-ADMIN C:\Users\andrew>exit
exit
    Connection to 55.55.55.55 closed.

但是,如果我想使用 scp 发送文件,则会失败:

andrew@debian:~$ scp test.fsx 55.55.55.55:c:/users/Andrew
[email protected]'s password: 
packet_write_wait: Connection to 55.55.55.55 port 22: Broken pipe
lost connection
andrew@debian:~$ 

知道什么地方出了问题吗?

答案1

看来你正在使用Windows 路径正确,所以这不是你的问题。

然而,目前移植 scp 子系统时似乎存在问题。引用自这个问题

至于 SCP,我相信在移植过程中存在一些问题,导致它在最近的几个版本中被删除,直到他们能够修复它为止。

因此,我猜您目前最好的选择是使用sftp,根据维基百科

答案2

截至目前(2016 年 6 月 1 日),该项目仍处于早期预览阶段。最新版本甚至标有“这是一个预发布版本(非生产就绪)”。我怀疑您在这里找不到太多帮助,直到它真正发布用于生产用途并且更多人开始使用它。您可能更幸运地在实际的 Github 存储库上打开问题。

相关内容