Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a fresh install of Ubuntu Server 10.04 and all is well when using the local term. However, when I use ssh to admin it remotely (it is on the same switch and in the same room) I can login and work for about 2 min. Then the term just stops responding, no errors, nothing. The server is still working fine.

If I kill the terminal and open a new one then login again all is well for another 2 min.

Any ideas?


share|improve this question
If you are not already doing so, use GNU screeen ( to protect yourself for losing work when your connection stalls. Your processes will continue when the connection stalls and after reconnecting you can run screen -r to get back to them (or screen -Dr to force the issue if screen hasn't registered the disconnect yet. This won't solve your problem, but will make it less inconvenient until you have found a cause and fixed it. – David Spillett Oct 17 '10 at 19:04
up vote 1 down vote accepted

Type dmesg and look for any errors. Also look in /var/log/messages

I had something just like this happen many years ago. Turned out to be a bad network card or a combination network card and driver problem. When I replaced the card, the problem went away.

share|improve this answer

It could be bad network, try pinging the remote server and see if it has packet loss

share|improve this answer

Try moving your server or your client to a different port on the switch, and/or reboot your switch. This could be bad ARP mapping.

share|improve this answer

Another idea might be to disable the ssh session timeouts. However, if you're getting booted out in two minutes, you may not be running into these timeouts.

If I were you, I'd add this line to your sshd_config:

LogLevel DEBUG

Restart your ssh daemon and wait to get booted out of your session again. Once that happens, dig in /var/log/daemon.log and /var/log/messages for some debug information. Don't forget to comment out the DEBUG line shown above and restart ssh once you've read the logs. The messages flowing in from the ssh daemon can fill up your logs rather quickly.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.