1.5.21: sshd fails to start as service (error 1062) but runs fine from command line

Brian Kasper kasper@aero.org
Wed Nov 8 20:15:00 GMT 2006


I've searched through the mailing list archives and Googled for help on
this problem, but I haven't found any information so far.  I'd really
appreciate any suggestions anyone can offer.

I recently had to perform a complete uninstall-and-reinstall of Cygwin
on a Win2K/SP4 box.  To do this, I stopped all Cygwin services, deleted
all references to "cygwin" in my registry, deleted the entire c:/Cygwin
tree from my system, deleted all the Cygwin setup files and setup.exe,
downloaded the latest setup.exe, and performed a full Cygwin install.  I
set up all mounts as "for everyone" and "binary", and "mount" shows all
my mounts are "type system (binmode)".

I then ran ssh-host-config to set up the sshd service on my system using
privilege separation.

When I tried to start the sshd service with "cygrunsrv -S sshd", I
received the error message "cygrunsrv: Error starting a service:
QueryServiceStatus:  Win32 error 1062: The service has not been
started.".  I also received an error message when I tried to start the
"Cygwin sshd" service in the Computer Management "Services" dialog.

(In case it's important, mountd and portmap fail to load using cygrunsrv
with the same error.)

I'm not the Administrator user, but I do have administrator-level
permissions on the system (i.e. I'm in the Administrators group).

I tried rerunning ssh-host-config and turning off privilege separation,
but I get the same error message.

If I run sshd in a bash shell as "/usr/sbin/sshd -D" on the command
line, I can then ssh to localhost in another shell.  The prompt I see is
"Enter passphrase for key '/home/kasper/.ssh/id_rsa':", instead of what
I seem to remember used to be something like "kasper@aag939.aero.org's
password:", but I can then enter my passphrase and log in.

I can log in to other systems using the Cygwin ssh client, but when I
log in to a Linux system and then try to ssh back to the Cygwin box, the
login fails with the message "Permission denied, please try again."
(even though I know I'm typing the correct password).

I've attached "cygcheck.out" containing the output of "cygcheck -s -v
-r" to this post.

The file /var/log/sshd.log is empty, which I find strange.

Here's a listing of the contents of /var on my system:

dr-xr-x---+ 6 kasper Users 0 Nov  6 11:56 cache
drwxrwxrwt+ 3 kasper Users 0 Nov  6 12:14 cron
drwxr-xr-x+ 2 SYSTEM root  0 Nov  6 15:38 empty
dr-xr-x---+ 5 kasper Users 0 Nov  6 12:20 lib
dr-xr-x---+ 5 kasper Users 0 Nov  7 08:00 log
dr-xr-x---+ 5 kasper Users 0 Nov  6 11:43 openldap
drwxr-xr-x+ 2 SYSTEM root  0 Nov  6 12:27 proftpd
dr-xr-x---+ 2 kasper Users 0 Nov  6 16:00 run
dr-xr-x---+ 4 kasper Users 0 Nov  6 12:16 spool
dr-xr-x---+ 2 kasper Users 0 Nov  6 11:20 tmp
dr-xr-x---+ 5 kasper Users 0 Nov  6 11:20 www

It appears this is a perennial problem, but I've not been able to figure
out how to fix it.

-B

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20061108/d7c5359d/attachment.ksh>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list