[Linux-disciples] Killing a specific sshd instance

Adam Kessel adam at rosi-kessel.org
Wed Feb 18 17:46:47 EST 2004


On Wed, Feb 18, 2004 at 03:39:38PM -0500, Stephen R Laniel wrote:
> One of my machines at work lost network connectivity, so I lost
> the ssh connection to my home machine. It hasn't timed out yet,
> so I have a dangling TCP connection. Netstat gives me the port
> number of that connection, and ps gives me the process numbers of
> all my sshd instances. Is there any way to figure out which port
> number maps to which sshd instance, so that I can kill the
> appropriate sshd instance?

It should be running as user slaniel, so that would limit it, and pids
accumulate incrementally, so I would just kill lower sshd pids with uid
slaniel.
-- 
Adam Kessel
http://adam.rosi-kessel.org


More information about the Linux-disciples mailing list