This is the mail archive of the cygwin@cygwin.com 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: SSH connection close when _any_ user logs out of W2K


> Date: Mon, 13 Oct 2003 16:38:29 +0100 (BST)
> From: "Dr.D.J.Picton" <dave@aps5.ph.bham.ac.uk>
> Subject: Re: SSH connection close when _any_ user logs out of W2K
> To: cygwin@cygwin.com
> Mime-Version: 1.0
> Content-MD5: IFHKe0TcizXXvm44ktLQnA==
> 
> > Date: Mon, 13 Oct 2003 15:08:25 +0100 (BST)
> > From: "Dr.D.J.Picton" <dave@aps5.ph.bham.ac.uk>
> > Subject: Re: SSH connection close when _any_ user logs out of W2K

> > >At 05:23 PM 9/30/2003, Matthew Hilty wrote:
> > >>Hello,
> > >>        I've noticed on a recent installation of OpenSSH under cygwin
> > >>(followed  http://tech.erdelynet.com/cygwin-sshd.html) that users
> > >>connected to the server via SSH have their connections closed if any
> > >>Windows user logs out of the desktop. The SSHD daemon still functions,
> > >>it just closes active sessions.  After this, I can SSH back to the
> > >>server and my session stays active until I intentionally log out, or
> > >>another Windows users logs in, then out.

I've found a workaround!  You need to tell bash to ignore SIGHUP.  (This
will also be inherited by processes started by the shell).

I added the following to /etc/profile, so that the shell will ignore
SIGHUP in an interactive session started by sshd:

# Fix to sshd problem (any Windows logout kills interactive ssh sessions)
if [ -n "$SSH_TTY" ]; then
   trap '' SIGHUP
fi




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