Implement channel inactivity timeouts
authordjm <djm@openbsd.org>
Fri, 6 Jan 2023 02:47:18 +0000 (02:47 +0000)
committerdjm <djm@openbsd.org>
Fri, 6 Jan 2023 02:47:18 +0000 (02:47 +0000)
commiteb1834773e881283e57207db7c4301eaa3ab880a
tree83913d482c243a2d4c0d996bafa4cc7016defca3
parente425622f263d3336f7ab701c8e33efa3b8fb87c1
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
usr.bin/ssh/channels.c
usr.bin/ssh/channels.h
usr.bin/ssh/monitor_wrap.c
usr.bin/ssh/servconf.c
usr.bin/ssh/servconf.h
usr.bin/ssh/sshd.c
usr.bin/ssh/sshd_config.5