This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: sshd automatically close connection after successful login


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@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@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf
Of Corinna Vinschen
Sent: Friday, August 20, 2004 4:13 AM
To: cygwin@cygwin.com
Subject: Re: sshd automatically close connection after successful login

On Aug 19 22:07, Christopher Cobb wrote:
> Igor Pechtchanski <pechtcha <at> 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@cygwin.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]