rcolebaugh / rpms / openssh

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