Orphaned SSH shells after X crashes

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm looking for a rock solid way of determining which SSH sessions are
actually orphaned after an X lockup. I've been tasked to come up with
a way to determine which ssh sessions are actually currently valid and
which are orphaned. I was thinking of trying to rip the info out with
lsof, but i am not having much luck with finding something the valid
open sessions have that the orphaned ones don't, or vice versa. I
would like to scriot and cron this cleanup to run every 10 minutes, as
the open and orphaned ssh shells have this nasty side effect of
keeping our keys intatct until we go in and manually kill them. I'm
wondering if there is a way to associate the sshd processes that have
a pty attached to them (valid open ssh tunnel) and their attached
ssh-agent process.


Re: Orphaned SSH shells after X crashes

Quoted text here. Click to load it

If you're using OpenSSH, maybe ClientAliveInterval would help?

Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

Site Timeline