[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: logging out users



> How do you logout "leftover" sessions? For example, I
> ssh'd into my debian box, the connection went down
> because of line problems, and when I log back in the
> old session is still there. I don't know how to kill
> it. This happened a couple of times, so in one case I
> killed the the ssh pid thinking that would take care
> of it, but now I have an "orphaned" login. Any help is
> appreciated. Thanks.
> 
If it's only broken off ssh sessions you want to clean out, 
set the server to send keep-alive-pings (man sshd)
and don't forget to adjust the client ssh to answer to them.

Look in man sshd for KeepAlive...

Then, if the server doesn't get answers from the client it disconnects
automagically.

If you want to kill leftover processes:
on redhat & sun 'kill -9 -1' always worked. It just tries to kill off 
about every process (but it only succeeds for those belonging to you
ofcourse)

For some reason kill -9 -1 doesn't work on debian.
I use /usr/sbin/slay <another user> with slay in punish-mode, does about
the same thing & you don't have to lookup ps-numbers...

Dries





Reply to: