Cygwin sshd did not start due to a logon failure

17,514

Solution 1

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

Solution 2

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!

Solution 3

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

Solution 4

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:
17,514

Related videos on Youtube

Philippe Blayo
Author by

Philippe Blayo

One of the best experience in my life has been to enjoy pair programming with developers that value clean code and simple design. It's called eXtreme Programming and I hope one day I'll have the opportunity to do it again.

Updated on September 18, 2022

Comments

  • Philippe Blayo
    Philippe Blayo over 1 year

    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
    
    • Aaron Miller
      Aaron Miller over 11 years
      Did you install the sshd service manually, or via ssh-host-config? What Windows version are you running?
    • Philippe Blayo
      Philippe Blayo over 11 years
      @AaronMiller: install with ssh-host-config on Windows-7
  • Philippe Blayo
    Philippe Blayo over 11 years
    The 5 rights cyg_server has: SeAssignPrimaryTokenPrivilege, SeCreateTokenPrivilege,SeTcbPrivilege SeServiceLogonRight and SeDenyRemoteInteractiveLogonRight. Is it correct?
  • Ramhound
    Ramhound almost 8 years
    How does one remove the user? Said user isn't even a standard user. So if it exists it was created by the end user.
  • Pierre-Alexis de Solminihac
    Pierre-Alexis de Solminihac almost 8 years
    @Ramhound Privileged server is the Windows user that was created by running ssh-host-config -y. It is an administrator account.
  • DavidPostill
    DavidPostill almost 4 years
    Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so. For example which checkbox on what proper tab.