-1

Getting the below error msg while starting the cygwin services on windows 2003 server , the SSHD file is showing 0KB.

$ 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.

Window's Event Viewer shows the service starting, and then almost immediately after, stopping:

The CYGWIN sshd service was successfully sent a start control.

The CYGWIN sshd service entered the stopped state.

The Application log again shows the service stopping for a reason I cannot explain:

The description for Event ID ( 0 ) in Source ( sshd ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: sshd: PID 4956: `sshd' service stopped, exit status: 57.

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
vikas
  • 349
  • 3
  • 6
  • 13

1 Answers1

2
  1. Open a cygwin window as administrator (right click, run as administrator)
  2. Run /usr/bin/ssh-host-config
    1. new local account ‘sshd’? (yes/no) yes
    2. Do you want to install sshd as a server? yes
    3. Enter the value of CYGWIN for the daemon: [] (DON’T ENTER ANYTHING, PRESS ENTER)
    4. Do you want to use a different name? (yes/no) no
    5. Create new privileged user account ‘cyg_server’? (yes/no) yes
    6. Please enter the password: ENTER YOUR PASSWORD HERE
    7. Reenter: RE-ENTER YOUR PASSWORD
  3. cygrunsrv --start sshd

That should do it. You can test it:

ssh -vv localhost

If sshd is in fact now running and yet you still can't connect, suspect a firewall.

Dan Garthwaite
  • 2,962
  • 1
  • 19
  • 31
  • I tried to run the bash as administartor but when i right click the bash the option "RUN AS ADMINISTRATOR" is not showing only open is showing up , any other way where i can run it as administrator ?? – vikas Dec 25 '14 at 09:10
  • could anyone please respond on the above query ?? – vikas Dec 26 '14 at 08:31
  • Certainly - either find the actual bash.exe program in \cygwin\bin or open a CMD prompt as administrator and then subsequently run bash.exe. If you don't see the option to run bash as administrator you are very likely right clicking on a link to the executable (a shortcut) and not the application itself. – Dan Garthwaite Dec 26 '14 at 21:25
  • How goes the battle? – Dan Garthwaite Dec 31 '14 at 15:46
  • @vikas - Did you ever make any progress on this? – Dan Garthwaite Feb 02 '15 at 02:27
  • first question: Query: Should StrictModes be used? (yes/no) - and: Do you want to install sshd as a service, not `server` – Timo Jul 27 '18 at 19:24