From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by sourceware.org (Postfix) with ESMTPS id 10398398D031 for ; Thu, 17 Sep 2020 16:17:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 10398398D031 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=berkeley.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=carrier@berkeley.edu Received: by mail-pj1-x1035.google.com with SMTP id q4so1534096pjh.5 for ; Thu, 17 Sep 2020 09:17:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=berkeley-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=EhdXbNW4dv3fQmJCL9/Z4UgFtpWkPhJ9nWG7nZNLuDU=; b=g8aGKVBgWTaEPoHDFpoSiBONq05UdoXmBNIodrIpXOZDkurK798FKTJkMDCGC+6pzT 1EDMGc6qoshG7gUvJ+EBIkvyWY5Hn75f1o5q1R0xxAwyeweqrkzbQEFUdFXSIbqeN8xl X6P55EQs9bd26i37kD5sk3qrc0xJhpmf0npRpE+Er9N6GEM9/ZEKh5FcPdOOiHHnvjoM vua5ZPdkmIauxBAWspQiJR3piQb8+lff+bR6Q3Ju9RPVqz+mMJjFjgCnsJOwOyquqv9x F/8JuBPjEzMt5Zvc4XnV66fWYbdN37idOff6/zeZtVHWHdrSpipNoGnaRk8P/8maZVu9 ii1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=EhdXbNW4dv3fQmJCL9/Z4UgFtpWkPhJ9nWG7nZNLuDU=; b=hE3wR8WZA0lGeb5GhA1gb6L+IPlzyd2GOuMWSCqvwZnzeqRm3Nw9U2FdIKUyWld6J3 V/QiiOVYnnTmjURkTQWGZt3ArIK5nYjlkeVspTIr0glnnHoVzOWTM8jDD14EV4pvJDDD t23Rh6TgkErjCD7bGMURX2VcrhFvohEnoyYdPjXQlklDs10KfhPnX6x98O9abZjt0C7m FdOL+we2qyeLHEO/LIvbiIGkMgHRQulzEGssEIKKzxf+Y1oLURVFZ5e0iThR4ML3D91s R92SMs694nkdG4IiLxcRBXrrlXpp9Jy8wgY1ulSriQjWeDPcCQnezWJwr90sz0Ee4Ijt 8pSw== X-Gm-Message-State: AOAM5300W5ggKfca5TfdsAaqlGsUUGR9SaisQ9qDSHpW/nIE6tym5CpF WMiyvGXcDJgdpQyA8QFP/xw3p9yLB/VC9A== X-Google-Smtp-Source: ABdhPJyTRFjBS6QiVbWZ1CTEDNlyYQQ0iHn82VRKyq1SO8dmUCGEl0nfX3cTwQLVElBh3YV3Qp5siQ== X-Received: by 2002:a17:902:8491:b029:d1:9bd3:6653 with SMTP id c17-20020a1709028491b02900d19bd36653mr28715471plo.1.1600359421532; Thu, 17 Sep 2020 09:17:01 -0700 (PDT) Received: from iguana.crashland.org (ec2-52-35-100-111.us-west-2.compute.amazonaws.com. [52.35.100.111]) by smtp.gmail.com with ESMTPSA id f12sm92583pfa.31.2020.09.17.09.17.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Sep 2020 09:17:00 -0700 (PDT) Received: by iguana.crashland.org (Postfix, from userid 510) id 06017640DF; Thu, 17 Sep 2020 09:17:00 -0700 (PDT) Date: Thu, 17 Sep 2020 09:16:59 -0700 From: Stephen Carrier To: Peter Board Cc: "cygwin@cygwin.com" Subject: Re: Cygwin 3.1.5, 3.1.6 and 3.1.7 builds reporting tty errors with OpenSSH Services in indows Event Logs Message-ID: <20200917161659.GA22221@iguana.crashland.org> References: <20200915162230.GA14401@iguana.crashland.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2020 16:17:05 -0000 Please don't top-post in this list. I'll move your reply down. > From: [2]Stephen Carrier > Sent: Wednesday, 16 September 2020 2:22 AM > To: [3]Peter Board > Cc: [4]cygwin@cygwin.com > Subject: Re: Cygwin 3.1.5, 3.1.6 and 3.1.7 builds reporting tty errors > with OpenSSH Services in indows Event Logs > > > On Mon, Sep 14, 2020 at 08:18:53AM +0000, Peter Board via Cygwin wrote: > > Hi, > > > > I am trying to update our Cygwin libraries at work, which we use on > many servers to provide OpenSSH services. > > I have been making update packages for many years from a Cygwin > install on a development server, and went to update our systems to the > latest OpenSSH 8.3p1 build. > > > > However after making the update package, I found that the Windows > Event Log (or if Syslogd is setup – which we do have in our general > Cygwin deployment /var/log/messages) gets two errors when using any > version of the Cygwin Libraries after the 3.1.4 build. > > > > > > Sep 14 12:06:48 hostname sshd: PID 2093: error: Failed to disconnect > from controlling tty. > > > > Sep 14 12:06:48 hostname sshd: PID 2093: error: ioctl(TIOCSCTTY): > Operation not permitted > Can this be reproduced in a standard cygwin install? It seems as if > your have a customized environment where you compile your own packages, > and updated the cygwin libs perhaps w/o updating openssh at the same > time. > Stephen > > References > > 1. https://go.microsoft.com/fwlink/?LinkId=550986 > 2. mailto:carrier@berkeley.edu > 3. mailto:p_board@hotmail.com > 4. mailto:cygwin@cygwin.com On Tue, Sep 15, 2020 at 11:46:30PM +0000, Peter Board wrote: > Hi Stephen, > > > Thanks for responding. I have a standard Cygwin install on my > Development server (32bit and 64bit setups) that I extract the updates > from for our custom package and I tested for the fault after I saw it > was occurring in our custom Cygwin install using the standard Cygwin > setup. The same errors are being logged in the standard Cygwin install. > I ran the Cygwin sshd installation script in the standard 64bit Cygwin > install, to create the Cygwin OpenSSH service, authorised my user > account to login and found that the Windows Event logs also logged the > same errors as our normal package location. > > > I keep the standard installs on “F:\Cygwin” (32bit Cygwin) and > “F:\Cygwin64” (64bit Cygwin). > > > Our Custom Cygwin \ OpenSSH package lives on “C:\Program > Files(x86)\OpenSSH”, which is where we have kept it for 15+ odd years. > > > After setting up the Cygwin (64bit version) just using a out of the box > Cygwin installer on F:\Cygwin64, I setup OpenSSH using the built in > /bin/ssh-host-config script and then authorised my user to login to the > “cygsshd” service. The standard SSH service with no modifications from > me, produces these errors in the Windows Event Logs. > > > It accepted the password and logged the user in fine to bash shell. > (I’ve removed the hostname and username from the example below) > > > ---------- Event Log Entries ------------ > > > Log Name: Application > > Source: sshd > > Date: 14/09/2020 4:30:26 PM > > Event ID: 0 > > Task Category: None > > Level: Information > > Keywords: Classic > > User: SYSTEM > > Computer: hostname > > Description: > > The description for Event ID 0 from source sshd cannot be found. Either > the component that raises this event is not installed on your local > computer or the installation is corrupted. You can install or repair > the component on the local computer. > > > If the event originated on another computer, the display information > had to be saved with the event. > > > The following information was included with the event: > > > sshd: PID 1620: Accepted password for USERNAME from X.X.X.X port 56545 > ssh2 > > > Event Xml: > > > > > > > > 0 > > 4 > > 0 > > 0x80000000000000 > > > > 2427841 > > Application > > hostname > > > > > > > > sshd: PID 1620: Accepted password for USERNAME from X.X.X.X > port 56545 ssh2 > > > > > > > ---------- Event Log Entries ------------ > > > Log Name: Application > > Source: sshd > > Date: 14/09/2020 4:30:27 PM > > Event ID: 0 > > Task Category: None > > Level: Error > > Keywords: Classic > > User: SYSTEM > > Computer: hostname > > Description: > > The description for Event ID 0 from source sshd cannot be found. Either > the component that raises this event is not installed on your local > computer or the installation is corrupted. You can install or repair > the component on the local computer. > > > If the event originated on another computer, the display information > had to be saved with the event. > > > The following information was included with the event: > > > sshd: PID 1622: error: Failed to disconnect from controlling tty. > > > Event Xml: > > > > > > > > 0 > > 2 > > 0 > > 0x80000000000000 > > > > 2427842 > > Application > > hostname > > > > > > > > sshd: PID 1622: error: Failed to disconnect from controlling > tty. > > > > > > ---------- Event Log Entries ------------ > > > Log Name: Application > > Source: sshd > > Date: 14/09/2020 4:30:27 PM > > Event ID: 0 > > Task Category: None > > Level: Error > > Keywords: Classic > > User: SYSTEM > > Computer: hostname > > Description: > > The description for Event ID 0 from source sshd cannot be found. Either > the component that raises this event is not installed on your local > computer or the installation is corrupted. You can install or repair > the component on the local computer. > > > If the event originated on another computer, the display information > had to be saved with the event. > > > The following information was included with the event: > > > sshd: PID 1622: error: ioctl(TIOCSCTTY): Operation not permitted > > > Event Xml: > > > > > > > > 0 > > 2 > > 0 > > 0x80000000000000 > > > > 2427843 > > Application > > hostname > > > > > > > > sshd: PID 1622: error: ioctl(TIOCSCTTY): Operation not > permitted > > > > > > > -------------- End of Entries ------------------ > > > Regards, > > > Peter > > > Sent from [1]Mail for Windows 10 Hi Peter. If you can reproduce the error with a standard cygwin install as you claim, why muddy the waters by talking about your custom builds? A problem in the standard install is of much more interest to the list and would provide some focus that is missing from this report, which is all over the place and has me confused about how anyone would go about helping you. Is it possible that the message is coming from the Windows OpenSSH server? Finding errors in the Event Log instead of /var/log/cygsshd.log suggests this to me. Also, the fact that the service name is 'sshd' instead of 'cygsshd'. Maybe have a look at /var/log/cygsshd.log to see if some other process grabbed port 22 preventing cygsshd from starting. Also, you don't say what client you are using. Are these errors in response to an attempted client connection or do they happen at service startup? How about with different clients? Stephen