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 Date: Mon, 4 Oct 2004 17:47:33 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: overbored cc: cygwin AT cygwin DOT com Subject: Re: Help disconnecting SSH sessions In-Reply-To: <4161C240.6090903@overbored.net> Message-ID: References: <4161C240 DOT 6090903 AT overbored DOT net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 On Mon, 4 Oct 2004, overbored wrote: > I would like to disconnect an SSH session. My sshd is set up as a > Windows service (with the help of cygrunsrv). I am also currently logged > in via SSH, so I'd like to kill another specific SSH session (I know > where I'm logged in from). 'w' shows the two connections - my current > one and the other one (to be killed). I just don't know how to proceed > from here on out. ps doesn't list the processes, and using tasklist, I > have no way of associating which sshd corresponds to which connection > (and in fact it looks like there are three sshd's...I'm guessing the one > with the lowest PID is the service, which spawns the other sshd's). Any > hints? Thanks in advance. FYI, 'ps' only shows the processes for the current user (default flags are '-lu$USER'). 'ps -el' should show all Cygwin processes (including the sshd ones, running as SYSTEM [UID 18]). FWIW, you don't need to know the number of the sshd process to kill the connection -- just "kill -1 ", where is the pid of the *shell* for the connection to be terminated. The sshd process will die automatically once the child exits. Also, this is NOT Cygwin-specific at all. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,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/