Whenever I ssh to elsewhere, the connection is fine for 1-10 minutes, then hangs: no error messages, just stops accepting input. I can exit (CR
-~
-.
) but that's it. I can't find anything suspicious in my logs, or on the server I'm connecting to. Running ssh -vvv
doesn't produce any messages around the time of disconnection, and connecting to sshd -dd
doesn't say anything then either. I don't think it's a timeout, since it happens at irregular intervals: sometimes 1 minute, sometimes 10. I can tell exactly when it disconnects by running while $(sleep 1); do date; done
on the remote computer.
Other notes:
- All ssh connections I have running at once hang at the same time.
tcpdump
shows me that when it hangs, it also stops sending or receiving packets.netstat
says that the connection is still ESTABLISHED, however.- It sounds a lot like this thread, but setting
ServerAliveInterval
to e.g. 30 instead results in the connection ending withTimeout, server not responding.
- I'm running openssh 1:6.7p1-2 in Debian sid.
This may well be a problem with connectivity, not just ssh, but I'm trying to get debugging information, somehow.
How can I debug this?
tcpdump
on the server ? This might give a clue about what's happening. I'd run it inside a screen session and detach it so it doesn't interfere / isn't affected by disconnects. – lemonsqueeze Oct 18 '14 at 8:23