Better detect SSh connections closing