Erro ao iniciar um serviço. Status do serviço de consulta: erro win32 1062
Sometimes you get a sshd/cygrunsrv service error after trying to run the service.
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062: The service has not been started.
There can be a couple of causes for this. The following may fix the problem (this is not an option on XP Home).
Solution 1.
You may have an old or corrupt installation of Cygwin. Try reinstalling.
The following may also help:
cygrunsrv -R sshd
- REBOOT (or use the Task Manager to kill all instances of sshd that may be running in the background)
- run
ssh-host-config -y
again.This seemed to help on a few systems I worked on.
Solution 2.
Open an explorer window and use the "Properties | Security" dialog and explicitly add "Full Control" for the SYSTEM user to the following directories:
C:\Cygwin C:\Cygwin\var C:\Cygwin\var\log
Fonte Guia SSHD do Cygwin
Veja também a pergunta StackOverflow Incapaz de iniciar o serviço cygwin sshd