proto-mismatch.sh revision 98937
1193326Sed#	$OpenBSD: proto-mismatch.sh,v 1.3 2002/03/15 13:08:56 markus Exp $
2193326Sed#	Placed in the Public Domain.
3193326Sed
4193326Sedtid="protocol version mismatch"
5193326Sed
6193326Sedmismatch ()
7249423Sdim{
8193326Sed	server=$1
9193326Sed	client=$2
10193326Sed	banner=`echo ${client} | ${SSHD} -o "Protocol=${server}" -i -f ${OBJ}/sshd_proxy`
11193326Sed	r=$?
12193326Sed	trace "sshd prints ${banner}"
13193326Sed	if [ $r -ne 255 ]; then
14193326Sed		fail "sshd prints ${banner} and accepts connect with version ${client}"
15193326Sed	fi
16193326Sed}
17193326Sed
18193326Sedmismatch	2	SSH-1.5-HALLO
19193326Sedmismatch	1	SSH-2.0-HALLO
20193326Sed