=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sshd_config.5,v retrieving revision 1.345 retrieving revision 1.346 diff -u -r1.345 -r1.346 --- src/usr.bin/ssh/sshd_config.5 2023/01/06 08:44:11 1.345 +++ src/usr.bin/ssh/sshd_config.5 2023/01/17 09:44:48 1.346 @@ -33,8 +33,8 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd_config.5,v 1.345 2023/01/06 08:44:11 jmc Exp $ -.Dd $Mdocdate: January 6 2023 $ +.\" $OpenBSD: sshd_config.5,v 1.346 2023/01/17 09:44:48 djm Exp $ +.Dd $Mdocdate: January 17 2023 $ .Dt SSHD_CONFIG 5 .Os .Sh NAME @@ -460,6 +460,9 @@ requesting another channel of the same type. In particular, expiring an inactive forwarding session does not prevent another identical forwarding from being subsequently created. +See also +.Cm UnusedConnectionTimeout , +which may be used in conjunction with this option. .Pp The default is not to expire channels of any type for inactivity. .It Cm ChrootDirectory @@ -1257,6 +1260,7 @@ .Cm AuthorizedPrincipalsFile , .Cm Banner , .Cm CASignatureAlgorithms , +.Cm ChannelTimeout , .Cm ChrootDirectory , .Cm ClientAliveCountMax , .Cm ClientAliveInterval , @@ -1296,6 +1300,7 @@ .Cm StreamLocalBindMask , .Cm StreamLocalBindUnlink , .Cm TrustedUserCAKeys , +.Cm UnusedConnectionTimeout , .Cm X11DisplayOffset , .Cm X11Forwarding and @@ -1812,6 +1817,33 @@ .Cm TrustedUserCAKeys . For more details on certificates, see the CERTIFICATES section in .Xr ssh-keygen 1 . +.It Cm UnusedConnectionTimeout +Specifies whether and how quickly +.Xr sshd 8 +should close client connections with no open channels. +Open channels include active shell, command execution or subsystem +sessions, connected network, socket, agent of X11 forwardings. +Forwarding listeners, such as those from the +.Xr ssh 1 +.Fl R +flag are not considered as open channels and do not prevent the timeout. +The timeout value +is specified in seconds or may use any of the units documented in the +.Sx TIME FORMATS +section. +.Pp +Note that this timeout starts when the client connection completes +user authentication but before the client has an opportunity to open any +channels. +Caution should be used when using short timeout values, as they may not +provide sufficient time for the client to request and open its channels +before terminating the connection. +.Pp +The default +.Cm none +is to never expire connections for having no open channels. +This option may be useful in conjunction with +.Cm ChannelTimeout . .It Cm UseDNS Specifies whether .Xr sshd 8