How to kill dead ssh login
Pieter de Goeje
pieter at degoeje.nl
Mon Jan 1 12:53:16 PST 2007
On Monday 01 January 2007 15:08, Grant Peel wrote:
> Hi all,
>
> The odd time, my ISP will disconnect me which leaves me with dead remote
> sesssions:
>
> 57696 p0- IEs 0:00.01 tcsh -c su
> 57697 p0- IE+ 0:00.03 _su (csh)
> 59069 p1 IWs 0:00.00 tcsh -c su
> 59070 p1 S 0:00.04 _su (csh)
>
> constellation# w
> 9:05AM up 3 days, 18:06, 2 users, load averages: 0.05, 0.07, 0.02
> USER TTY FROM LOGIN@ IDLE WHAT
> mefromremote p0 xxxxxxxx.ca 8:33AM 30 _su (csh)
> mefromremote p1 xxxxxxxx.ca 8:50AM - w
>
> p0 is no longer connected do to a reset. How do I properly kill that
> session?
>
> I have already tried killing and TERMing 57696 and 57697 to no avail.
>
> -Grant
Try killing the responsible sshd process:
pyotr at unforgiven:~> w
9:35PM up 19 days, 13:31, 2 users, load averages: 0.60, 0.44, 0.43
USER TTY FROM LOGIN@ IDLE WHAT
pyotr p2 nox 9:33PM 1 -tcsh (tcsh)
pyotr p3 nox 9:33PM - w
pyotr at unforgiven:~> ps x | grep sshd
33240 ?? I 0:00.00 sshd: pyotr at ttyp2 (sshd)
33246 ?? S 0:00.01 sshd: pyotr at ttyp3 (sshd)
33264 p3 R+ 0:00.00 grep sshd
pyotr at unforgiven:~> kill 33240
Cheers,
Pieter de Goeje
More information about the freebsd-questions
mailing list