Unable to start cygwin sshd service

Matthew Moisen picture Matthew Moisen · Jul 19, 2013 · Viewed 39.8k times · Source

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 service; I entered no value for CYGWIN for daemon; I entered no for using a different name; yes for creating new privilege user account.

In my services.msc I am unable to start the service:

The CYGWIN sshd service on Local Computer started and then stopped. 
Some services stop automatically if they are not in use by other services
or programs.

In the cygwin prompt, net start sshd produces:

The CYGWIN sshd service could not be started. 
The service did not report an error.
More help is available by typing NET HELPMSG 3534

In the cygwin prompt, cygrunsrv -S sshd produces:

cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
The service has not been started.

My /var/log/sshd.log says the following:

Unable to initialize device PRN

I've searched the questions on SO related to this issue, as well as the general Internet, and I guess what makes my question unique has to do with the sshd.log. I can't find anyone else who has received this.

I'm doing this to install Hadoop on my Windows. I cannot run a virtual machine on this slow computer as everything just bogs down.

Answer

user2933412 picture user2933412 · Dec 14, 2013

I followed the steps in this topic and the problem was still happening, then I checked the sshd log file and it was complaining that the privilegies of the ssh private key were to open.

I executed the follow command:

chmod 400 /etc/ssh_host_ecdsa_key

Then I run the service:

net start sshd

It finally worked (BTW: I am using Windows 8)