Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Is there a way to disable a telnet session from my desktop to a server from timing out, ever. This should be done from the client if at all possible.

share|improve this question

Does it have to be telnet? Using plain telnet is highly discouraged due to it not being very secure.

If you can use SSH, it has two features that will help you: TCPKeepAlive (which is enabled by default, so no need to use it) and ServerAliveInterval (which is disabled by default, so enabling this may help you).

From the man page (man ssh_config):

         Sets a timeout interval in seconds after which if no data has
         been received from the server, ssh(1) will send a message through
         the encrypted channel to request a response from the server.  The
         default is 0, indicating that these messages will not be sent to
         the server, or 300 if the BatchMode option is set.  This option
         applies to protocol version 2 only.

To use this on a one-time basis:

ssh -o 'ServerAliveInterval=30'

To use it always, add ServerAliveInterval 30 to your .ssh/config file:

Host *
  ServerAliveInterval 30
share|improve this answer
I would love to use ssh, but the people running the server I have been asked to connect to want to still use telnet. – philipballew Mar 12 '12 at 20:58

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.