rcolebaugh / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone
d7ff6e
diff --git a/serverloop.c b/serverloop.c
d7ff6e
index e16eabe2..a8c99e2e 100644
d7ff6e
--- a/serverloop.c
d7ff6e
+++ b/serverloop.c
d7ff6e
@@ -184,7 +184,8 @@ client_alive_check(struct ssh *ssh)
d7ff6e
 	int r, channel_id;
d7ff6e
 
d7ff6e
 	/* timeout, check to see how many we have had */
d7ff6e
-	if (ssh_packet_inc_alive_timeouts(ssh) >
d7ff6e
+	if (options.client_alive_count_max > 0 &&
d7ff6e
+	    ssh_packet_inc_alive_timeouts(ssh) >
d7ff6e
 	    options.client_alive_count_max) {
d7ff6e
 		sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id));
d7ff6e
 		logit("Timeout, client not responding from %s", remote_id);
d7ff6e
diff --git a/sshd_config.5 b/sshd_config.5
d7ff6e
index d47cb0d2..2cddbd59 100644
d7ff6e
--- a/sshd_config.5
d7ff6e
+++ b/sshd_config.5
d7ff6e
@@ -519,6 +519,9 @@ is set to 15, and
d7ff6e
 .Cm ClientAliveCountMax
d7ff6e
 is left at the default, unresponsive SSH clients
d7ff6e
 will be disconnected after approximately 45 seconds.
d7ff6e
+Setting a zero
d7ff6e
+.Cm ClientAliveCountMax
d7ff6e
+disables connection termination.
d7ff6e
 .It Cm ClientAliveInterval
d7ff6e
 Sets a timeout interval in seconds after which if no data has been received
d7ff6e
 from the client,