Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

SSH connection to AMI Instance gets terminate often. i do open by vi /etc/ssh/sshd_config but it seems to empty.

what configuration needs to be modified so that we could eliminate the remote shell from being terminated.

share|improve this question

This is probably unrelated to AWS. I have had sessions open for days without interruption. Does this happen if you connect to other services?

The only time I have had this problem is when a local ADSL modem/router was behaving badly. Replacing the router completely solved the problem. Perhaps you could get hold of a different router to try it.

share|improve this answer

Some router between the client and the server may be dropping the session when it goes too long without activity. Try setting the ServerAliveInterval or TCPKeepAlive options for ssh. These will cause ssh to send something to the server at regular intervals to keep the connection from being completely idle. Here is a copy of the ssh config file documentation.

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.