子系统请求在通道0上失败scp:连接已关闭-Macbook



你能帮我吗

当我在终端中运行此程序时:scp-p-p 29418michealvern.genzola@192.168.0.122:hook/commit msg"jyei erp/.git/hooks/";

上面写着:通道0上的子系统请求失败scp:连接关闭

有人帮我

尝试-O作为scpcmd中的选项,即

scp-p-O-p 29418michealvern.genzola@192.168.0.122:hook/commit msg"jyei erp/.git/hooks/">

面临类似的问题。这个解决方案来自github中关于这个问题的评论。有关更多详细信息-https://github.com/PowerShell/Win32-OpenSSH/issues/1945

在Linux上得到了确切的症状。给予-O解决了这个问题。来自scp manpage

-O      Use the original SCP protocol for file transfers instead of the SFTP protocol.  Forcing the use of the
SCP protocol may be necessary for servers that do not implement SFTP, for backwards-compatibility for
particular filename wildcard patterns and for expanding paths with a ‘~’ prefix for older SFTP servers.

我也面临这个问题,添加-O标志修复了我的问题,正如@pyssbrg在上面所说的那样,最终命令:

scp -p -O -P 29418 michealvern.genzola@192.168.0.122:hooks/commit-msg "jyei-erp/.git/hooks/"

最新更新