freebsd-dev/crypto/openssh/regress/proto-mismatch.sh

18 lines
368 B
Bash
Raw Normal View History

2018-05-06 12:24:45 +00:00
# $OpenBSD: proto-mismatch.sh,v 1.5 2017/04/30 23:34:55 djm Exp $
2002-06-27 22:31:32 +00:00
# Placed in the Public Domain.
tid="protocol version mismatch"
mismatch ()
{
client=$2
2018-05-06 12:24:45 +00:00
banner=`echo ${client} | ${SSHD} -i -f ${OBJ}/sshd_proxy`
2002-06-27 22:31:32 +00:00
r=$?
trace "sshd prints ${banner}"
if [ $r -ne 255 ]; then
2018-05-06 12:24:45 +00:00
fail "sshd prints ${banner} but accepts version ${client}"
2002-06-27 22:31:32 +00:00
fi
}
2018-05-06 12:24:45 +00:00
mismatch SSH-1.5-HALLO