Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to start cygwin sshd service

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.

like image 986
Matthew Moisen Avatar asked Jul 19 '13 00:07

Matthew Moisen


People also ask

Can I SSH using cygwin?

To configure the Cygwin SSH daemon: Start the cygwin bash shell. From your system information, use the cygwin mkpasswd utility to create an initial /etc/passwd. You can also use the mkgroup utility to create an initial /etc/ group.

How do I stop SSH in cygwin?

To stop the service, in a Windows command prompt, type net stop sshd . Alternatively, you can change to the C:\cygwin\bin directory (or open a bash shell) and type cygrunsrv -stop sshd .


1 Answers

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)

like image 145
user2933412 Avatar answered Sep 23 '22 05:09

user2933412