執行的步驟:
- 透過以下方式安裝 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 和 7 中一切正常,但在最新的 Windows 10 版本中則不然,因為預先安裝了 OpenSSL(卸載並不能解決問題):
%WinDir%\system32\openssl\sshd.exe
- 在此之前,在 Windows 10 和 7 中一切正常,但在最新的 Windows 10 版本中則不然,因為預先安裝了 OpenSSL(卸載並不能解決問題):
答案1
b
不再需要步驟。
問題ssh-host-config
是 Microsoft 現在預設安裝 a,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.