upstream: make sshd_config:ClientAliveCountMax=0 disable the
connection killing behaviour, rather than killing the connection after sending the first liveness test probe (regardless of whether the client was responsive) bz2627; ok markus OpenBSD-Commit-ID: 5af79c35f4c9fa280643b6852f524bfcd9bccdaf
This commit is contained in:
parent
bf986a9e27
commit
69334996ae
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: serverloop.c,v 1.220 2020/01/25 04:48:26 djm Exp $ */
|
/* $OpenBSD: serverloop.c,v 1.221 2020/01/25 22:41:01 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
|
@ -184,7 +184,8 @@ client_alive_check(struct ssh *ssh)
|
||||||
int r, channel_id;
|
int r, channel_id;
|
||||||
|
|
||||||
/* timeout, check to see how many we have had */
|
/* timeout, check to see how many we have had */
|
||||||
if (ssh_packet_inc_alive_timeouts(ssh) >
|
if (options.client_alive_count_max > 0 &&
|
||||||
|
ssh_packet_inc_alive_timeouts(ssh) >
|
||||||
options.client_alive_count_max) {
|
options.client_alive_count_max) {
|
||||||
sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id));
|
sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id));
|
||||||
logit("Timeout, client not responding from %s", remote_id);
|
logit("Timeout, client not responding from %s", remote_id);
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\" $OpenBSD: sshd_config.5,v 1.301 2020/01/25 22:36:22 djm Exp $
|
.\" $OpenBSD: sshd_config.5,v 1.302 2020/01/25 22:41:01 djm Exp $
|
||||||
.Dd $Mdocdate: January 25 2020 $
|
.Dd $Mdocdate: January 25 2020 $
|
||||||
.Dt SSHD_CONFIG 5
|
.Dt SSHD_CONFIG 5
|
||||||
.Os
|
.Os
|
||||||
|
@ -519,6 +519,9 @@ is set to 15, and
|
||||||
.Cm ClientAliveCountMax
|
.Cm ClientAliveCountMax
|
||||||
is left at the default, unresponsive SSH clients
|
is left at the default, unresponsive SSH clients
|
||||||
will be disconnected after approximately 45 seconds.
|
will be disconnected after approximately 45 seconds.
|
||||||
|
Setting a zero
|
||||||
|
.Cm ClientAliveCountMax
|
||||||
|
disables connection termination.
|
||||||
.It Cm ClientAliveInterval
|
.It Cm ClientAliveInterval
|
||||||
Sets a timeout interval in seconds after which if no data has been received
|
Sets a timeout interval in seconds after which if no data has been received
|
||||||
from the client,
|
from the client,
|
||||||
|
|
Loading…
Reference in New Issue