From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33841 invoked by alias); 10 May 2017 17:28:38 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 33124 invoked by uid 89); 10 May 2017 17:28:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*r:ip*192.168.1.100, Hx-spam-relays-external:!192.168.1.100!, H*RU:!192.168.1.100!, H*r:sk:smtp-ou X-HELO: smtp-out-so.shaw.ca Received: from smtp-out-so.shaw.ca (HELO smtp-out-so.shaw.ca) (64.59.136.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 May 2017 17:28:36 +0000 Received: from [192.168.1.100] ([174.0.238.184]) by shaw.ca with SMTP id 8VPgdwyE4eQWU8VPhdv5IG; Wed, 10 May 2017 11:28:37 -0600 X-Authority-Analysis: v=2.2 cv=UpATD64B c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=v2bxMrvrkyOJ8p7MdJ4A:9 a=QEXdDO2ut3YA:10 From: Brian Inglis Subject: Re: Installing sshd with option --type manual References: To: cygwin@cygwin.com Reply-To: Brian.Inglis@SystematicSw.ab.ca Message-ID: <03c9c136-c08c-e96d-3f73-6c279e6d43b0@SystematicSw.ab.ca> Date: Wed, 10 May 2017 18:01:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfNfWfH5GqabHLbR+NEa23o1dFDAb9s4qC7hvw0MrjY794Y70xY0xS14HyyaDRnFBZWL74QkL9TUtvWoTnWUmyf3RobltZVSGv79jFlhU0rZdzRSMB3xu POFfhk/CWnOAd8vxipSEsw6aTCbGC9m6gGif/yRK+9rNO8XMZoXKUA7vYSZfvZf/Lsgp/28ZGUrhdA== X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00157.txt.bz2 On 2017-05-09 23:05, Charles Russell wrote: >> On 5/4/2017 3:31 PM, Fran Litterio wrote: >>> You can try opening the Services Control Panel app (run "start >>> services.msc" in a Command Prompt) and changing the startup type >>> of service "Cygwin sshd" to "Automatic (Delayed Start)". > Yes! I was looking in the alphabetized list of services for sshd, not > for CYGWIN sshd. ...or from an elevated admin shell where you installed the Cygwin service with cygrunsrv -I or ran the /bin/...-config script e.g.: $ sc config sshd start= delayed-auto depend= cygserver/tcpip no space before = (part of option), space between = and value required, services it should start after and depends on separated by forward slashes. >From any shell, you can list installed Cygwin services using $ cygrunsrv -L with -V also listing all parameters and their values. >From any shell, you can also list and modify parameters easily using e.g. $ regtool list -p /HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/sshd Parameters\ Type Start ErrorControl ImagePath DisplayName DependOnService ObjectName $ regtool set -d /HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/sshd/DelayedAutostart 1 $ regtool list -p /HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/sshd Parameters\ Type Start ErrorControl ImagePath DisplayName DependOnService ObjectName DelayedAutostart $ regtool get /HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/sshd/DelayedAutostart 1 $ regtool list -p /HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/sshd/Parameters AppPath AppArgs $ regtool set -d /HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/sshd/Parameters/Preshutdown 1 $ regtool list -p /HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/sshd/Parameters AppPath AppArgs Preshutdown $ regtool get /HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/sshd/Parameters/Preshutdown 1 with the usual caveats regarding registry key names, changes, and modifications. Parameters and other cygrunsrv changes will not be picked up until the service is stopped and restarted from cygrunsrv in an elevated admin shell. This approach has the advantages that cygrunsrv does not support service or parameter changes or modifications, cygrunsrv -I and sc config require an elevated admin shell, sc config does not support cygrunsrv and other services' Parameters and other features, and regedit requires formatted file input or a GUI. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple