Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After a cygwin sshd install, sshd service fails with:

Error 1069: The service did not start due to a logon failure

I try to give cyg_server standard user and admin access. The error is the same with graphical interface and cygrunsrv.exe -S sshd.

Edit: What worked for me:

Install cyglsa-config
Run sshd with SYSTEM account
chown SYSTEM /var/empty
share|improve this question
    
Did you install the sshd service manually, or via ssh-host-config? What Windows version are you running? –  Aaron Miller Oct 9 '12 at 14:20
1  
@AaronMiller: install with ssh-host-config on Windows-7 –  Philippe Blayo Oct 9 '12 at 14:22

4 Answers 4

up vote 3 down vote accepted

For Windows 2003 and later, the ssh-host-config script suggests using a service account, so that correct privileges can be set (because the built-in SYSTEM account has had certain powers removed in W2003).

However, the cygwin team has developed another strategy, which I have had good luck with (on Windows 7 and Server 2008 R2, anyway). If you use the cyglsa-config script to set up the cygwin LSA authentication package, you can switch the SSHD service back to using the System account, and no password would be necessary (and the ssh server works better, too).

The cygwin announcement and description of this feature as at http://cygwin.com/ml/cygwin-developers/2006-11/msg00000.html

For more gory details, see http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd2

share|improve this answer

From the Cygwin mailing list:

It may be instructive to run this command to see what rights the sshd_server has:

editrights -l -u sshd_server

Once you get this fixed, you may have sporadic problems starting sshd when rebooting. To fix them, make sure that the Netlogon service has started before starting the sshd service. Edit the registry and add Netlogon to the DependOnService value in the

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sshd key.

In short, you are ensuring that the system can talk to the domain controller before it tries to start sshd.

Also try starting your terminal in Administrator mode. Right click on the icon, then click "Run as Administrator".

share|improve this answer
    
The 5 rights cyg_server has: SeAssignPrimaryTokenPrivilege, SeCreateTokenPrivilege,SeTcbPrivilege SeServiceLogonRight and SeDenyRemoteInteractiveLogonRight. Is it correct? –  Philippe Blayo Oct 10 '12 at 10:24

I ran into this issue after a mandated password change on the system.

What worked for me was to reset the service's user(sshd_server)'s password using cygwin's passwd in an Administrative cygwin shell. Once I did this, I was able to start the service and everything was back to normal.

  1. passwd sshd_server
  2. Reset or change your password
  3. ???
  4. Profit
share|improve this answer

The problem is usually that the password that was set for the sshd service does not fill with the window's password policy. try to change the password provided to the sshd user to one which has at least 1 capital letter, one number and a minimum length of 8 characters. That worked for me in windows 8. Bye!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.