delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/08/01/12:10:22

X-Recipient: archive-cygwin AT delorie DOT com
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
X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o-
Date: Mon, 1 Aug 2011 12:09:38 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: sshd conflicts with mintty allocating /dev/tty[0-9]
Message-ID: <20110801160938.GB32416@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4E36CB68 DOT 3000606 AT ank-sia DOT com>
MIME-Version: 1.0
In-Reply-To: <4E36CB68.3000606@ank-sia.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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 AT 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 AT openssh DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019