This is the mail archive of the
mailing list for the Cygwin project.
Triumph over cygrunsrv, sshd and error 1062
- From: "Seren" <seren at ipsb dot edu>
- To: <cygwin at cygwin dot com>
- Date: Tue, 4 Feb 2003 10:50:06 -0800
- Subject: Triumph over cygrunsrv, sshd and error 1062
After a half day of troubleshooting, reading mailing lists, and pulling
hair (mine that is), I finally figured out my problem with getting sshd
to run and wanted to share it since it took so long to find the
I had installed cygwin, openssh, and various packages on Windows 2000
server without a hitch and was trying to get sshd to run as a service.
I'd done everything in all the cygwin/sshd/windows guides, and even
RTFM. The ssh-host-config script ran fine, however trying to run the
sshd service from the Services management console, using "net start
sshd", or from cygwin (cygrunsvr -S sshd) failed.
Depending on the method of trying to start sshd, the errors included
"could not load host key", "Win32 error 1062", and various errors about
the host_key files not being valid files (the latter were probably
permissions errors). After chmoding and chowning everything to
perfection, making sure that SYSTEM was in the group file and hadn't
been munged, and triple checking my environment variables I was stumped.
The problem turned out to be the mount points in the registry. I
finally ran across Igor Pechtchanski's post
essentially gave the fix. I had installed Cygwin "Just for me" instead
of for "Everyone" on the machine which put cygwin's mount points for
"/", "/usr/bin", and "/usr/lib" in the HKEY_CURRENT_USER portion of the
registry rather than the HKEY_LOCAL_MACHINE. Merely copying the entries
from HKCU to the corresponding section of HKLM magically allowed sshd to
start (since it's run as SYSTEM).
Since it was so hard to find such a simple solution, I figured I'd post
this and get it into the mailing list archives.
ps. Other helpful resource for newbies setting up sshd under cygwin:
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html