ssh-host-config 不適用於最新的 Windows 10 版本

ssh-host-config 不適用於最新的 Windows 10 版本

執行的步驟:

  1. 透過以下方式安裝 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
    
  2. 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

答案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.

相關內容