Unable to start cygwin sshd service

后端 未结 5 410
终归单人心
终归单人心 2021-02-01 16:55

I entered ssh-host-config into the cygwin prompt (started with admin privileges), said yes to privilege separation, new local account sshd, install sshd as a servic

5条回答
  •  既然无缘
    2021-02-01 17:48

    Followed the steps provide by Andrea Solution 1 and solution 2 , it did not work. Event viewer did not provide any info.

    So took a look at the log var/log/sshd.log first it complained that it was unable to load the dll:

    /usr/sbin/sshd.exe: error while loading shared libraries: cygcrypto-1.0.0.dll
    

    Solution:

    • Reinstalled the package and ensured that the dll were in lib.
    • Started the service again still it failed but this time it complained about missing host key.

      Could not load host key: /etc/ssh_host_dsa_key Could not load host key: /etc/ssh_host_ecdsa_key Disabling protocol version 2. Could not load host key sshd: no hostkeys available -- exiting.

    Solution:

    • go to the Cygwin Command prompt (with run as admin ) and
    • enter ssh-keygen -A
      the missing host key were generated .

    Finally I was able to start it.

    I would recommend looking at the log file further if the above solution does not work.

提交回复
热议问题