summaryrefslogtreecommitdiffstats
path: root/sshd.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2023-01-06 02:47:18 +0000
committerDamien Miller <djm@mindrot.org>2023-01-06 16:23:16 +1100
commit2d1ff2b9431393ad99ef496d5e3b9dd0d4f5ac8c (patch)
tree3f244d571a85c08ae82b00c079af13b12e49e462 /sshd.c
parent0e34348d0bc0b1522f75d6212a53d6d1d1367980 (diff)
upstream: Implement channel inactivity timeouts
This adds a sshd_config ChannelTimeouts directive that allows channels that have not seen traffic in a configurable interval to be automatically closed. Different timeouts may be applied to session, X11, agent and TCP forwarding channels. Note: this only affects channels over an opened SSH connection and not the connection itself. Most clients close the connection when their channels go away, with a notable exception being ssh(1) in multiplexing mode. ok markus dtucker OpenBSD-Commit-ID: ae8bba3ed9d9f95ff2e2dc8dcadfa36b48e6c0b8
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sshd.c b/sshd.c
index 72525525..64399bca 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.594 2022/12/16 06:56:47 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.595 2023/01/06 02:47:19 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2158,6 +2158,7 @@ main(int ac, char **av)
/* Prepare the channels layer */
channel_init_channels(ssh);
channel_set_af(ssh, options.address_family);
+ process_channel_timeouts(ssh, &options);
process_permitopen(ssh, &options);
/* Set SO_KEEPALIVE if requested. */