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