Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Seren" To: Subject: Triumph over cygrunsrv, sshd and error 1062 Date: Tue, 4 Feb 2003 10:50:06 -0800 Message-ID: <004c01c2cc7e$42101110$1a01010a@ipsb.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal 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 solution. 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 (http://sources.redhat.com/ml/cygwin/2002-10/msg01885.html) which 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. -Seren ps. Other helpful resource for newbies setting up sshd under cygwin: http://tech.erdelynet.com/cygwin-sshd.html -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/