In response to ClientAliveInterval
and ClientAliveCountMax
restrictions server side, a client can choose to send null packets by setting ServerAliveInterval
and ServerAliveCountMax
values appropriately.
How can I still ensure that a session is considered valid only if there has been legitimate data exchanged (i.e. non-null packets)? Essentially how do I make the SSH server ignore all null packets from the client?
If the client goes out of their way to write a loop using top or a dummy shell script to keep session alive, that's a different issue since it's an active act of leaving a session open. I am trying to prevent a session kept open when the user has locked their screen or walked away for a prolonged period.
Thanks.
EDIT: for further clarity I must add that the server in question here is an SSH jump server on which a user will not be allowed to obtain TTY. Hence relying simply on sshd_config is not sufficient.