首页 > 解决方案 > 通过 SSH / Cygwin 从 mac rsync 到 Windows 10

问题描述

我设置了运行良好的 Windows 10 的 OpenSSH 服务器。

为了在 Windows 上使用 rsync,我安装了 Cygwin。这也很好。

现在我将 Cygwin 设置为 SSH 连接的标准 shell:

$ New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\cygwin64\Cygwin.bat" -PropertyType String -Force

当我通过 SSH 连接到 Windows 机器时,Cygwin 按预期打开。我可以很好地同步计算机上的文件夹:

$ rsync -a  /cygdrive/c/source/ /cygdrive/f/target/

但是,一旦我尝试从我的 mac rsync 到目标,我就会收到一个错误:

$ rsync -a /Users/mac/test/ username@10.0.0.11:/backup

bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

任何想法如何解决这个问题?

谢谢!

标签: shellcygwinopenssh

解决方案


推荐阅读