delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/08/01/11:51:35

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD,TW_MK
X-Spam-Check-By: sourceware.org
Message-ID: <4E36CB68.3000606@ank-sia.com>
Date: Mon, 01 Aug 2011 18:51:04 +0300
From: Alexey Luchko <luch AT ank-sia DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: sshd conflicts with mintty allocating /dev/tty[0-9]
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

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


--
Regards,
Alexey.



--
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