Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Subject: RE: sshd automatically close connection after successful login Date: Tue, 31 Aug 2004 10:38:54 -0400 Message-ID: <536E63F3472B3F4486A01F301164FEC8584DBB@mccmsrv.mccnet.mobilecom.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Cary Lewis" To: Note-from-DJ: This may be spam Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i7VEhSfC007364 I am having similar problems under windows 2003, but perhaps the problem is really with the latest ssh. I noticed the following which I feel is a clue, but do not know what to make of it: When I log into via ssh and specify a password and get an interactive shell and do a id command I get the following: uid=11103(Cary Lewis) gid=10513(Domain Users) groups=10512(Domain Admins),10513( Domain Users),11112(Field Service Config),11356(Fuel - Integration),11702(Global MCCDEVS1),11767(MCCNET NxTGeN),11522(NMD - Full Access),11523(NMD - Read Access ),12133(PCN Writers),12156(Source safe access),12173(SPR),12143(Staff Update),0( root),544(Administrators),545(Users) But if I specify id on the command line: uid=1(MCCNET\Cary+Lewis) gid=2(MCCNET\Domain+Users) groups=3(Everyone),4(Users), 5(Administrators),6(INTERACTIVE),7(Authenticated+Users),8(This+Organizat ion),8(T his+Organization),9(MCCNET\Global+MCCDEVS1),10(MCCNET\NMD+-+Read+Access) ,11(MCCN ET\Domain+Admins),12(MCCNET\MCCNET+NxTGeN),13(MCCNET\NMD+-+Full+Access), 14(MCCNE T\SPR),15(MCCNET\PCN+Writers),16(MCCNET\Staff+Update),17(MCCNET\Field+Se rvice+Co nfig),18(MCCNET\Fuel+-+Integration),19(MCCNET\Source+safe+access),20(MCC NET\Deve lopers) This happens with or without privilege separation enable in sshd_config. This must be why the shell auto logs out if authorized_keys is used to auto login, and I think this is why I can't access /dev/st0 from a command run on the ssh line. Okay, it appears as though the directory structure is messed up! When I try to ls -l / on a ssh cmd line, I get c:\ files, not c:\cygwin If I try to explicitly run /cygwin/bin/mount.exe I get: bash: line 1: /cygwin/bin/mount.exe: No such file or directory but: $ ssh localhost "ls /cygwin/bin/mou*" /cygwin/bin/mount.exe As well: + ssh localhost 'echo $PATH' xxx AT localhost's password: /cygdrive/c/Perl/bin/:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/ cygdrive /c/WINDOWS/System32/Wbem:/cygdrive/c/Bin:/cygdrive/c/Program Files/MAX/bin:/cygd rive/c/PROGRA~1/Vision:/cygdrive/c/PROGRA~1/Vision/SYSTEM:/cygdrive/c/PR OGRA~1/C OMMON~1/VisionC:/Program Files/Microsoft SQL Server/80/Tools/BINN:/cygdrive/c/Pr ogram Files/Symantec/pcAnywhere/:/cygdrive/c/Program Files/Common Files/Roxio Sh ared/DLLShared:/cygdrive/c/Program Files/Microsoft SDK/Bin/:/cygdrive/c/Program Files/Microsoft SDK/Bin/WinNT/:/cygdrive/c/Program Files/ActiveState Komodo 2.5/ :/cygdrive/c/Program Files/Compuware/TestPartner:/cygdrive/c/Program Files/Compu ware/TestPartner/AppExtDlls:/cygdrive/c/Program Files/ActiveState Komodo 3.0/:/c ygdrive/c/PROGRA~1/MKSTOO~1/bin:/cygdrive/c/PROGRA~1/MKSTOO~1/bin/X11:/c ygdrive/ c/PROGRA~1/MKSTOO~1/mksnt:/cygdrive/c/SFU/common/:.:/bin I have other Unix emulators installed on the computer, namely mks and sfu, but these do not interfere with a interactive login via ssh, but perhaps sshd is not finding the resources it needs. I had the same set up on previous version of windows (w2k server) and did not have these problems. So the ultimate question is, when does sshd set up the environment, specifically the mount points. Thanks for any help! -----Original Message----- From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of Corinna Vinschen Sent: Friday, August 20, 2004 4:13 AM To: cygwin AT cygwin DOT com Subject: Re: sshd automatically close connection after successful login On Aug 19 22:07, Christopher Cobb wrote: > Igor Pechtchanski cs.nyu.edu> writes: > > Yes, but you have to reinstall the sshd service, not just restart sshd, > > i.e., > > > > cygrunsrv -E sshd; cygrunsrv -R sshd; ssh-host-config; cygrunsrv -S sshd I just added resp. removed the -r from the appropriate registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sshd\Parameters and restarted sshd. > Yes, that's what I did before, and I did it again just to make sure, and I still > get an immediate "Connection to xxx closed." after typing my password. > > That's the right -r isn't it? Is there something else that needs to be done? Yes, sure. It's not helpful to see it failing and then do nothing else. What does the logs show? Did you try starting sshd in debug mode from the command line (Dont' forget to change ownership of /etc/ssh* and /var/empty)? Talking about reading the mailing list: http://cygwin.com/ml/cygwin/2004-08/msg00625.html Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/