From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20622 invoked by alias); 1 Aug 2011 16:10:12 -0000 Received: (qmail 20607 invoked by uid 22791); 1 Aug 2011 16:10:10 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_MK,TW_YG,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from nm14-vm2.bullet.mail.ne1.yahoo.com (HELO nm14-vm2.bullet.mail.ne1.yahoo.com) (98.138.91.90) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 01 Aug 2011 16:09:54 +0000 Received: from [98.138.90.54] by nm14.bullet.mail.ne1.yahoo.com with NNFMP; 01 Aug 2011 16:09:53 -0000 Received: from [98.138.226.63] by tm7.bullet.mail.ne1.yahoo.com with NNFMP; 01 Aug 2011 16:09:53 -0000 Received: from [127.0.0.1] by smtp214.mail.ne1.yahoo.com with NNFMP; 01 Aug 2011 16:09:53 -0000 X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o- Received: from cgf.cx (cgf@173.76.51.125 with login) by smtp214.mail.ne1.yahoo.com with SMTP; 01 Aug 2011 09:09:53 -0700 PDT Received: from localhost (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id 2AEDB13C002 for ; Mon, 1 Aug 2011 12:09:52 -0400 (EDT) Date: Mon, 01 Aug 2011 16:10:00 -0000 From: Christopher Faylor To: cygwin@cygwin.com Subject: Re: sshd conflicts with mintty allocating /dev/tty[0-9] Message-ID: <20110801160938.GB32416@ednor.casa.cgf.cx> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <4E36CB68.3000606@ank-sia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E36CB68.3000606@ank-sia.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2011-08/txt/msg00017.txt.bz2 On Mon, Aug 01, 2011 at 06:51:04PM +0300, Alexey Luchko wrote: >Hi, everyone! > > >I've run mkpasswd and mkgroups, installed sshd, run sshd-host-config, >turned on privilege separation, installed it as a service. > >'CYGWIN sshd' service starts normally but it closes connection right after >successful login: >""" >$ ssh localhost >user@localhost's password: >Connection to localhost closed by remote host. >Connection to localhost closed. >""" > >Logged in sshd's account and started '/usr/sbin/sshd -d' and tries to login >via ssh localhost. Tail of sshd output follows: >""" >debug1: userauth-request for user user service ssh-connection method password >debug1: attempt 2 failures 1 >Accepted password for user from ::1 port 63719 ssh2 >debug1: monitor_child_preauth: user has been authenticated by privileged >process >debug1: Entering interactive session for SSH2. >debug1: server_init_dispatch_20 >debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384 >debug1: input_session_request >debug1: channel 0: new [server-session] >debug1: session_new: session 0 >debug1: session_open: channel 0 >debug1: session_open: session 0: link with channel 0 >debug1: server_input_channel_open: confirm session >debug1: server_input_global_request: rtype no-more-sessions@openssh.com >want_reply 0 >debug1: server_input_channel_req: channel 0 request pty-req reply 1 >debug1: session_by_channel: session 0 channel 0 >debug1: session_input_channel_req: session 0 req pty-req >debug1: Allocating pty. >debug1: session_pty_req: session 0 alloc /dev/tty2 >chown(/dev/tty2, 11135, 10513) failed: Bad file descriptor >debug1: do_cleanup >debug1: session_pty_cleanup: session 0 release /dev/tty2 >""" > >It conflicts with mintty because every mintty allocates terminal for >himself like this running in mintty: >""" >$ ls -l `tty` >crw--w---- 1 user Domain Users 136, 0 Aug 1 18:46 /dev/tty0 >""" > >Version: CYGWIN_NT-6.1-WOW64 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin I don't understand how this conflicts with mintty. mintty should allocate the first tty if it is the first thing run. ssh would allocate some other pty (tty2) after that. I don't see anything amiss other than the error message above. We'll need to see the debugging details mentioned here: http://cygwin.com/problems.html Please provide information on any changes you've made to your ssh setup as well as the cygcheck output mentioned there. cgf -- 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