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),2(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' [EMAIL PROTECTED]'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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Corinna Vinschen Sent: Friday, August 20, 2004 4:13 AM To: [EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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/
Re: Re: sshd automatically close connection after successful login
Well, I do want privilege separation support. So, I did the following: cygrunsrv --remove sshd cygrunsrv --install sshd --path /usr/sbin/sshd --args -r --user sshd_server and cygrunsrv asks me for password for sshd_server, I just hit enter twice... cygrunsrv --start sshd gives me a logon error I think sshd_server has empty password, so what's up with this logon error? Perhaps you should check that. I'm curious as to why you created the 'sshd_server'. Are you running W2K3 server? If not, you're may be a little confused about the difference between privilege separation and the user that runs the service. Consult '/usr/share/doc/Cygwin/openssh.README' for the details. yes, i am using W2k3... Oh and a read- through of http://cygwin.com/problems.html would be beneficial if you have a follow-up question. It has guidance for what makes a good problem report. Thank you ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush -- 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/
Re: sshd automatically close connection after successful login
On Aug 19 20:08, Christopher Cobb wrote: Corinna Vinschen corinna-cygwin at cygwin.com writes: On Aug 19 05:19, Mike Skallas wrote: I had this same problem when I re-installed cygwin today. Took me a good hour to figure out what the hell was going on. Folks, does anybody of you actually *read* this mailing list or, FWIW, at least the package announcements? This is the pointer to my OpenSSH 3.9p1-1 announcement from *yesterday*: http://cygwin.com/ml/cygwin/2004-08/msg00633.html *shaking head* Corinna Thank you, Corinna, for pointing out this information: Thanks to an early bug report on the cygwin mailing list, I found that you *must* add the -r option when starting the sshd daemon, if you want to use privilege separation. ... However, since neither cygrunsrv nor sshd has a (documented) -r option (that I can see), I am not clear as to what we are supposed to do. Could you provide an example of what cygrunsrv command line we should use to install sshd. Could this also be reflected in a change to the ssh-host-config script? http://cygwin.com/ml/cygwin/2004-08/msg00702.html Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:[EMAIL PROTECTED] 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/
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:[EMAIL PROTECTED] 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/
Re: Re: sshd automatically close connection after successful login
On Aug 19 15:42, Ling F. Zhang wrote: Well, I do want privilege separation support. So, I did the following: cygrunsrv --remove sshd cygrunsrv --install sshd --path /usr/sbin/sshd --args -r --user sshd_server --args '-D -r' See /usr/share/doc/Cygwin/openssh.README Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:[EMAIL PROTECTED] 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/
RE: sshd automatically close connection after successful login
I had this same problem when I re-installed cygwin today. Took me a good hour to figure out what the hell was going on. It seems that this version of sshd/openssh and its config script asks you if you want to run something called privilege separation. If you run the script like so: ssh-host-config -y you are saying, Yes! Lets run in paranoid privilege separation mode! Instead just run this, thus avoiding saying yes to every question in the script: ssh-host-config And tell it NO when it asks about privilege separation. I tried to get privsec working, and my machine already had an sshd user account, but no dice and I got sick of playing with it for maginal gains in an unlikely security scenario. If you want you can read about privsec here: http://www.citi.umich.edu/u/provos/ssh/privsep.html but for us users who just need a simple sshd setup for a little remote access and some port forwarding it doesn't seem worth implementing. -- Mike Block Banner Ads Now http://everythingisnt.com/hosts.html -- 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/
Re: sshd automatically close connection after successful login
On Aug 19 05:19, Mike Skallas wrote: I had this same problem when I re-installed cygwin today. Took me a good hour to figure out what the hell was going on. Folks, does anybody of you actually *read* this mailing list or, FWIW, at least the package announcements? This is the pointer to my OpenSSH 3.9p1-1 announcement from *yesterday*: http://cygwin.com/ml/cygwin/2004-08/msg00633.html *shaking head* Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:[EMAIL PROTECTED] 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/
Re: sshd automatically close connection after successful login
At 06:57 AM 8/19/2004, you wrote: On Aug 19 05:19, Mike Skallas wrote: I had this same problem when I re-installed cygwin today. Took me a good hour to figure out what the hell was going on. Folks, does anybody of you actually *read* this mailing list or, FWIW, at least the package announcements? This is the pointer to my OpenSSH 3.9p1-1 announcement from *yesterday*: http://cygwin.com/ml/cygwin/2004-08/msg00633.html *shaking head* Corinna This is a mailing list? All these years I thought it was just a place to ask questions and get answers. Boy is my face red... ;-) -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- 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/
Re: sshd automatically close connection after successful login
Corinna Vinschen corinna-cygwin at cygwin.com writes: On Aug 19 05:19, Mike Skallas wrote: I had this same problem when I re-installed cygwin today. Took me a good hour to figure out what the hell was going on. Folks, does anybody of you actually *read* this mailing list or, FWIW, at least the package announcements? This is the pointer to my OpenSSH 3.9p1-1 announcement from *yesterday*: http://cygwin.com/ml/cygwin/2004-08/msg00633.html *shaking head* Corinna Thank you, Corinna, for pointing out this information: Thanks to an early bug report on the cygwin mailing list, I found that you *must* add the -r option when starting the sshd daemon, if you want to use privilege separation. ... However, since neither cygrunsrv nor sshd has a (documented) -r option (that I can see), I am not clear as to what we are supposed to do. Could you provide an example of what cygrunsrv command line we should use to install sshd. Could this also be reflected in a change to the ssh-host-config script? Thanks. -- 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/
Re: sshd automatically close connection after successful login
Christopher Cobb ccobb at email.com writes: Corinna Vinschen corinna-cygwin at cygwin.com writes: On Aug 19 05:19, Mike Skallas wrote: I had this same problem when I re-installed cygwin today. Took me a good hour to figure out what the hell was going on. Folks, does anybody of you actually *read* this mailing list or, FWIW, at least the package announcements? This is the pointer to my OpenSSH 3.9p1-1 announcement from *yesterday*: http://cygwin.com/ml/cygwin/2004-08/msg00633.html *shaking head* Corinna Thank you, Corinna, for pointing out this information: Thanks to an early bug report on the cygwin mailing list, I found that you *must* add the -r option when starting the sshd daemon, if you want to use privilege separation. ... I modified line 556 of ssh-host-config to be: if cygrunsrv -I sshd -d CYGWIN sshd -p /usr/sbin/sshd -a -D -r -u sshd_server -w ${_password} -e CYGWIN=${_cygwin} Notice the -r. I restarted sshd, but I still get: $ ssh [EMAIL PROTECTED] [EMAIL PROTECTED]'s password: Connection to momtst5 closed. The connection closes immediately as others have mentioned. Is that the form of -r that you mean? -- 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/
Re: sshd automatically close connection after successful login
On Thu, 19 Aug 2004, Christopher Cobb wrote: Christopher Cobb ccobb at email.com writes: Corinna Vinschen corinna-cygwin at cygwin.com writes: On Aug 19 05:19, Mike Skallas wrote: I had this same problem when I re-installed cygwin today. Took me a good hour to figure out what the hell was going on. Folks, does anybody of you actually *read* this mailing list or, FWIW, at least the package announcements? This is the pointer to my OpenSSH 3.9p1-1 announcement from *yesterday*: http://cygwin.com/ml/cygwin/2004-08/msg00633.html *shaking head* Corinna Thank you, Corinna, for pointing out this information: Thanks to an early bug report on the cygwin mailing list, I found that you *must* add the -r option when starting the sshd daemon, if you want to use privilege separation. ... I modified line 556 of ssh-host-config to be: if cygrunsrv -I sshd -d CYGWIN sshd -p /usr/sbin/sshd -a -D -r -u sshd_server -w ${_password} -e CYGWIN=${_cygwin} Notice the -r. I restarted sshd, but I still get: $ ssh [EMAIL PROTECTED] [EMAIL PROTECTED]'s password: Connection to momtst5 closed. The connection closes immediately as others have mentioned. Is that the form of -r that you mean? 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 HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Happiness lies in being privileged to work hard for long hours in doing whatever you think is worth doing. -- Dr. Jubal Harshaw -- 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/
Re: sshd automatically close connection after successful login
Igor Pechtchanski pechtcha at cs.nyu.edu writes: Christopher Cobb ccobb at email.com writes: I restarted sshd, but I still get: $ ssh Administrator at momtst5 Administrator at momtst5's password: Connection to momtst5 closed. The connection closes immediately as others have mentioned. Is that the form of -r that you mean? 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 HTH, Igor 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? -- 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/
Re: Re: sshd automatically close connection after successful login
Well, I do want privilege separation support. So, I did the following: cygrunsrv --remove sshd cygrunsrv --install sshd --path /usr/sbin/sshd --args -r --user sshd_server and cygrunsrv asks me for password for sshd_server, I just hit enter twice... cygrunsrv --start sshd gives me a logon error I think sshd_server has empty password, so what's up with this logon error? Thanx __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail -- 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/
Re: Re: sshd automatically close connection after successful login
At 06:42 PM 8/19/2004, you wrote: Well, I do want privilege separation support. So, I did the following: cygrunsrv --remove sshd cygrunsrv --install sshd --path /usr/sbin/sshd --args -r --user sshd_server and cygrunsrv asks me for password for sshd_server, I just hit enter twice... cygrunsrv --start sshd gives me a logon error I think sshd_server has empty password, so what's up with this logon error? Perhaps you should check that. I'm curious as to why you created the 'sshd_server'. Are you running W2K3 server? If not, you're may be a little confused about the difference between privilege separation and the user that runs the service. Consult '/usr/share/doc/Cygwin/openssh.README' for the details. Oh and a read- through of http://cygwin.com/problems.html would be beneficial if you have a follow-up question. It has guidance for what makes a good problem report. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- 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/