执行的步骤:
- 通过以下方式安装 cygwin:
C:\tmp\setup-x86_64.exe -q -B -R C:\cygwin -s http://cygwin.mirror.constant.com -l C:\tmp -A -o -P curl,rsync,dos2unix,make,git,unzip,openssh OpenSSL
-
mkpasswd -l -c > C:\cygwin\etc\passwd mkgroup -l -c > C:\cygwin\etc\groups
ssh 主机配置:
- 预期的:
*** Query: Should StrictModes be used? (yes/no) yes *** Query: Should privilege separation be used? <yes/no>: yes *** Query: New local account 'sshd'? <yes/no>: yes *** Query: Do you want to install sshd as a service? *** Query: <Say "no" if it is already installed as a service> <yes/no>: yes *** Query: Enter the value of CYGWIN for the deamon: [] binmode ntsec *** Query: Do you want to use a different name? (yes/no) yes/no
- 实际的:
*** Query: Should StrictModes be used? (yes/no) yes *** Info: Updating /etc/sshd_config file *** Info: Sshd service is already installed. *** Info: Host configuration finished. Have fun!
- 在此之前,在 Windows 10 和 Windows 7 中一切正常,但在最新的 Windows 10 版本中却不行,因为 OpenSSL 是预安装的(卸载并不能解决问题):
%WinDir%\system32\openssl\sshd.exe
- 在此之前,在 Windows 10 和 Windows 7 中一切正常,但在最新的 Windows 10 版本中却不行,因为 OpenSSL 是预安装的(卸载并不能解决问题):
答案1
b
不再需要此步骤。
问题ssh-host-config
是微软现在默认安装,sshd
所以你需要使用最新版本中提到的另一个名称
https://www.cygwin.com/ml/cygwin-announce/2019-04/msg00017.html
Portability
-----------
* sshd(8) Cygwin: Change service name to cygsshd to avoid collision
with Microsoft's OpenSSH port.