this is very unsafe. you should check that this PID is actually a ssh tunnel before killing a random process