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 To: cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ Path: not-for-mail From: "Jeroen W. Pluimers \(All I'M\)" Newsgroups: gmane.os.cygwin Subject: Proposed changes to ssh-host-config (was: SSHD does not start upon reboot, but manual is ok.) Date: Mon, 29 Apr 2002 17:45:34 +0200 Lines: 56 Message-ID: References: <3CCD160C DOT 41DBDA8D AT cern DOT ch> NNTP-Posting-Host: windows.xs4all.nl X-Trace: main.gmane.org 1020095345 14742 213.84.9.12 (29 Apr 2002 15:49:05 GMT) X-Complaints-To: usenet AT main DOT gmane DOT org NNTP-Posting-Date: Mon, 29 Apr 2002 15:49:05 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 "Lassi A. Tuura" wrote in message news:3CCD160C DOT 41DBDA8D AT cern DOT ch... > > What could prohibit the SSHD to start at boot-time? > > Is there some form of dependency? > Your sshd probably needs a dependency on other services; the names > aren't obvious to the uninitiated, but need to be up for sshd to start > (they are running by the time you start manually). I was asuming something like that. It seems to work fine on a regular PC, but not on a laptop. I presume this is because the laptop uses a different initialisation sequence. > The services required can vary depending on your system configuration. > I forget the names, look for "Tcpip", "LanmanWorkstation" or "Browser". > More details in the archives. I have looked in the archives, and tried various dependency settings. "LanmanWorkstation" gets translated into "Browser" and works. "Server" does not work, it generates errors. "LanmanServer" gets translated into "Server" and works. "Tcpip" works too, and I think it is the preferred solution, as I can't imagine a system running sshd without TCP/IP. During the testing, I found out that sshd barfs when the permissions on some files /etc/ssh*key are wrong. It seems that ssh-host-config usually creates these files with 777 as rights, in stead of 600. Based on both experiences, here are some proposed changes to the ssh-host-config script: ##original: ## if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -e "CYGWIN=${_cygwin}" ##solution 1: (tcpip dependency - preferred) if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -y tcpip -a -D -e "CYGWIN=${_cygwin}" ##solution 2: works (lanmanworkstation dependency) ## if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -y lanmanworkstation -a -D -e "CYGWIN=${_cygwin}" ##solution 3: (lanmanserver dependency) ## if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -y lanmanserver -a -D -e "CYGWIN=${_cygwin}" then chown system /etc/ssh* ## Make sure that sshd does not barf on permissions: chmod 600 /etc/ssh*key Please shoot at it. --jeroen -- 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/