summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--serverloop.c5
-rw-r--r--sshd_config.55
2 files changed, 7 insertions, 3 deletions
diff --git a/serverloop.c b/serverloop.c
index e16eabe27..a8c99e2e0 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.220 2020/01/25 04:48:26 djm Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.221 2020/01/25 22:41:01 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -184,7 +184,8 @@ client_alive_check(struct ssh *ssh)
184 int r, channel_id; 184 int r, channel_id;
185 185
186 /* timeout, check to see how many we have had */ 186 /* timeout, check to see how many we have had */
187 if (ssh_packet_inc_alive_timeouts(ssh) > 187 if (options.client_alive_count_max > 0 &&
188 ssh_packet_inc_alive_timeouts(ssh) >
188 options.client_alive_count_max) { 189 options.client_alive_count_max) {
189 sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id)); 190 sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id));
190 logit("Timeout, client not responding from %s", remote_id); 191 logit("Timeout, client not responding from %s", remote_id);
diff --git a/sshd_config.5 b/sshd_config.5
index d47cb0d24..2cddbd598 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -33,7 +33,7 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: sshd_config.5,v 1.301 2020/01/25 22:36:22 djm Exp $ 36.\" $OpenBSD: sshd_config.5,v 1.302 2020/01/25 22:41:01 djm Exp $
37.Dd $Mdocdate: January 25 2020 $ 37.Dd $Mdocdate: January 25 2020 $
38.Dt SSHD_CONFIG 5 38.Dt SSHD_CONFIG 5
39.Os 39.Os
@@ -519,6 +519,9 @@ is set to 15, and
519.Cm ClientAliveCountMax 519.Cm ClientAliveCountMax
520is left at the default, unresponsive SSH clients 520is left at the default, unresponsive SSH clients
521will be disconnected after approximately 45 seconds. 521will be disconnected after approximately 45 seconds.
522Setting a zero
523.Cm ClientAliveCountMax
524disables connection termination.
522.It Cm ClientAliveInterval 525.It Cm ClientAliveInterval
523Sets a timeout interval in seconds after which if no data has been received 526Sets a timeout interval in seconds after which if no data has been received
524from the client, 527from the client,