sshd service will not start on Windows 7

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

sshd service will not start on Windows 7

misterblinky
I installed cygwin on my windows 7 64-bit machine with openSSH and openSSL, nothing else.  

I then install sshd via ssh-host-config. I have tried with privilege separation and without it. The end result is the same: I cannot start sshd as a service (via net start sshd). When I do, I get the message "The CYGWIN sshd service could not be started."

The messages I've gotten in /var/log/sshd.log has varied. Most often, I've gotten the message "/var/empty must be owned by root and not group or world-writable". But I just did another clean install of cygwin and went through the process again and there are no messages in sshd.log though the server reports as usual that it cannot be started. (NOTE: I'm not suggesting that the results change even though i go through the same steps -- I'm trying different combinations of suggestions found on the web, sometimes with slightly different results, but always with the sshd server not starting.)

I've removed and clean installed cygwin probably 30 times, trying different tweaks.

Here are some more details:

In ssh-host-config interaction, I chose to create the privileged users cyg_server. After installing, as expected cyg_server is the owner of these files/dirs:

/var/empty
/etc/ssh*

Also, I changed permissions to /var/log and /var/log/sshd.log to 777 just to ensure that access to this wasn't blocked. I also tried various options (like chown-ing these to cyg_server).

The service is configured to run under .\cyg_server with the proper password.

I always install cygwin as "Administrator" and I open my cygwin console as "Administrator".

whoami gives me my windows login name as expected. However, NOT as expected the "groups <my-id>" command doesn't say that I'm in the Administrator group, which I am. It shows only "Domain Users". I've tried some workarounds suggested for "Domain Users" and none have succeeded

I've worked at this for 3 days (!!) and now I'm just dizzy and need some knowledgable help.

thanks in advance for your time/thoughts
Reply | Threaded
Open this post in threaded view
|

Re: sshd service will not start on Windows 7

marco atzeri-4
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: sshd service will not start on Windows 7

Bernd Prager
In reply to this post by misterblinky
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: sshd service will not start on Windows 7

marco atzeri-4
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: sshd service will not start on Windows 7

misterblinky
In reply to this post by Bernd Prager
Yes, cyg_server is a member of the Administrator group in Windows.

thanks


Reply | Threaded
Open this post in threaded view
|

Re: sshd service will not start on Windows 7

misterblinky
In reply to this post by marco atzeri-4
So ... a) cyg_server *is* in the Administrator group in Windows; and b) I ran the editrights commands just in case. Same deal. "CYGWIN sshd service could not be started".

Oddly, "groups cyg_server" returns "None root" -- cygwin doesn't think it's in the administrator group. 

thanks for your thoughts ... any further suggestions?




From: marco atzeri-4 [via Cygwin] <[hidden email]>
To: misterblinky <[hidden email]>
Sent: Tuesday, January 29, 2013 3:10 PM
Subject: Re: sshd service will not start on Windows 7

On 1/29/2013 9:04 PM, Bernd Prager wrote:
> On 1/29/2013 2:14 PM, misterblinky wrote:
>> I installed cygwin on my windows 7 64-bit machine with openSSH and
>> openSSL,
>> nothing else.

> Open Windows User Manager and check if cyg_server is in the
> Administrators group.
> My sshd does not start without this privilege.
> Also I get a better error message if I do "net start sshd".
>
> Try it. Good luck.
> -- Bernd

these are the rights needed by cyg_server and set by ssh-host-config

editrights -u cyg_server -a SeAssignPrimaryTokenPrivilege
editrights -u cyg_server -a SeCreateTokenPrivilege
editrights -u cyg_server -a SeTcbPrivilege
editrights -u cyg_server -a SeServiceLogonRight
editrights -u cyg_server -a SeIncreaseQuotaPrivilege

sometime in Domain the policy reset them for security reason

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple




If you reply to this email, your message will be added to the discussion below:
http://cygwin.1069669.n5.nabble.com/sshd-service-will-not-start-on-Windows-7-tp95750p95753.html
To unsubscribe from sshd service will not start on Windows 7, click here.
NAML


Reply | Threaded
Open this post in threaded view
|

Re: sshd service will not start on Windows 7

David Carricajo
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: sshd service will not start on Windows 7

Larry Hall (Cygwin)
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: sshd service will not start on Windows 7

Jamie Stallwood
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: sshd service will not start on Windows 7

b45710n
Jamie Stallwood wrote
I found, by enabling shell logon for cyg_server and then running sshd, that
/etc/ssh*_key permissions were too lax.

use the command: chmod g-rwx /etc/ssh*_key to fix these permissions.
What does that command do? I ran it attempting to solve what appeared to be the problem described in this thread, but it didn't resolve the error. How do I undo the effects of the command (to minimize unknowns when troubleshooting)?

Possibly relevant:

The message I get is:

$ net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.
$ NET HELPMSG 3534

The service did not report an error.
I followed the instructions at http://www.scottmurphy.info/open-ssh-server-sshd-cygwin-windows to set up sshd on windows via cygin.
Reply | Threaded
Open this post in threaded view
|

Re: sshd service will not start on Windows 7

Larry Hall (Cygwin)
CONTENTS DELETED
The author has deleted this message.