Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
ssh terminal session times out, how can this be changed

When ever I connect to a server using SSH with multiple windows, few connections get closed. It is probably because of ideal time. I have followed through this blog http://wiki.oseems.com/application/ssh/disable-timeout and its not working for me. I don't have permission the server to make changes. I there any way to disable or extend the connection time. I am using Ubuntu 11.04

Thank you

share|improve this question

migrated from stackoverflow.com Oct 17 '11 at 19:07

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Ivo Flipse Jul 15 '12 at 17:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Not programming-related - try askubuntu.com ? –  Paul R Oct 17 '11 at 17:28

1 Answer 1

You can add the following to your local /etc/ssh/ssh_config file (man ssh_config):

ServerAliveInterval 60

where 60 is in seconds. This will cause your client to send a message to the SSH server every 60 seconds which should keep the connection alive.

You can also use 'screen' to open multiple terminals on one connection (apt-get install screen). A nice thing about screen is that you can disconnect from the server but your processes keep running and you can reconnect later using screen -R. I think this is the best way, personally.

If you had access to the server configs, you could also update the ClientAliveInterval in /etc/ssh/sshd_config on the server (man sshd_config).

share|improve this answer