April 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

Categories

April 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

SSH timeouts make with CentOS 7

I like using CentOS on my servers and desktop machine. After I start using, my ssh connections terminate so quickly

like using CentOS on my servers and desktop machine. After I start using, my ssh connections terminate so quickly if I do not type anything at terminal in a few minutes, may be seconds. It is very annoying when you loose a active connection.
The message is
Write failed: Broken pipe
The situation is very annoying. Hence I find a workaround for this problem. .ssh/config tricks help me prevent this problem. The reason of the problem is keep alive messages. These messages are used for indicating if the connection is still in use. After Centos 7 installation ssh client’s keep alives have this problem. The setting about this problem is ServerAliveInterval. When typing connection parameters, if we set this parameter to 10 (seconds), we won’t get timeouts. The tricks is at setting the value at ./ssh/config file. This file is user manageable and no needs any root permissions. An example is
Host *
ServerAliveInterval 10

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>