Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

-Kerry

share|improve this question
    
If you are not already doing so, use GNU screeen (debian-administration.org/articles/34) 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

4 Answers 4

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

 
discard

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.