upstream: verify that ChannelTimeout in a Match block is effective

OpenBSD-Regress-ID: 30770cad71ca060aaaa05e4bdd0ea8941b768c6b
This commit is contained in:
djm@openbsd.org authored and Damien Miller committed 2026-07-21 16:20:23 +10:00
1 parent dd4556dc75
commit fed6e6fea6
1 file changed
+12 -1
+12 -1
View File
@@ -1,4 +1,4 @@
# $OpenBSD: channel-timeout.sh,v 1.2 2024/01/09 22:19:36 djm Exp $
# $OpenBSD: channel-timeout.sh,v 1.3 2026/07/21 06:18:23 djm Exp $
# Placed in the Public Domain.
tid="channel timeout"
@@ -47,6 +47,17 @@ if [ $r -ne 255 ]; then
fail "ssh returned unexpected error code $r"
fi
verbose "match command timeout"
(cat $OBJ/sshd_proxy.orig ;
echo "match user *" ;
echo "ChannelTimeout session:command=1") \
> $OBJ/sshd_proxy
${SSH} -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
r=$?
if [ $r -ne 255 ]; then
fail "ssh returned unexpected error code $r"
fi
verbose "command long timeout"
(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:command=60") \
> $OBJ/sshd_proxy