From 69ff6c84686dce8ad95cb9379fad9f8ddef6aa38 Mon Sep 17 00:00:00 2001 From: Jakub Czajka Date: Sun, 25 Sep 2022 19:44:41 +0200 Subject: [PATCH] [sshd] Limit the number of alive messages. `sshd` keeps idle connection alive for `ClientAliveInterval` seconds and then sends `ClientAliveCountMax` alive messages. If client does not respond, `sshd` terminates the connection. This commit limits the number of alive messages to 1. Note: `ClientAliveCountMax` applies only to SSH protocol 2. --- sshd/sshd_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sshd/sshd_config b/sshd/sshd_config index 15c76ec..7593a80 100644 --- a/sshd/sshd_config +++ b/sshd/sshd_config @@ -100,7 +100,7 @@ PrintMotd no #PermitUserEnvironment no #Compression delayed #ClientAliveInterval 0 -#ClientAliveCountMax 3 +ClientAliveCountMax 1 #UseDNS no #PidFile /var/run/sshd.pid #MaxStartups 10:30:100 -- 2.39.5