SSH server always terminating after some time