after specified time in ClientAliveInterval /etc/ssh/sshd_config
What value have you configured? sshd manpage states following:
ClientAliveInterval
Sets a timeout interval in seconds after which if no data has been
received from the client, sshd(8) will send a message through the
encrypted channel to request a response from the client. The default is 0,
indicating that these messages will not be sent to the client.
This option applies to protocol version 2 only.
If you want connection to time out, sounds like default value is the way to go.
Note session keepalive is also configured on the connecting client side in ~/.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.
This option applies to protocol version 2 only.
Eg myself don't want ssh sessions to time out, which is why I have following in my ~/.ssh/config
:
Host *
ServerAliveInterval 15
ServerAliveCountMax 3
Related thread