proto-mismatch.sh 368 B

123456789101112131415161718
  1. # $OpenBSD: proto-mismatch.sh,v 1.5 2017/04/30 23:34:55 djm Exp $
  2. # Placed in the Public Domain.
  3. tid="protocol version mismatch"
  4. mismatch()
  5. {
  6. client=$2
  7. banner=$(echo ${client} | ${SSHD} -i -f ${OBJ}/sshd_proxy)
  8. r=$?
  9. trace "sshd prints ${banner}"
  10. if [ $r -ne 255 ]; then
  11. fail "sshd prints ${banner} but accepts version ${client}"
  12. fi
  13. }
  14. mismatch SSH-1.5-HALLO