Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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):

 ServerAliveInterval
         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' your-server.com

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

 
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.