blob: 6ab28c9a7ad9411949a13952956db7a0d3b62e52 [file] [log] [blame]
djm@openbsd.orgdd369322017-04-30 23:34:55 +00001# $OpenBSD: proto-mismatch.sh,v 1.5 2017/04/30 23:34:55 djm Exp $
Damien Miller38cd4352002-05-01 13:17:33 +10002# Placed in the Public Domain.
3
4tid="protocol version mismatch"
5
6mismatch ()
7{
Damien Miller38cd4352002-05-01 13:17:33 +10008 client=$2
djm@openbsd.orgdd369322017-04-30 23:34:55 +00009 banner=`echo ${client} | ${SSHD} -i -f ${OBJ}/sshd_proxy`
Damien Miller38cd4352002-05-01 13:17:33 +100010 r=$?
11 trace "sshd prints ${banner}"
12 if [ $r -ne 255 ]; then
djm@openbsd.orgdd369322017-04-30 23:34:55 +000013 fail "sshd prints ${banner} but accepts version ${client}"
Damien Miller38cd4352002-05-01 13:17:33 +100014 fi
15}
16
djm@openbsd.orgdd369322017-04-30 23:34:55 +000017mismatch SSH-1.5-HALLO