Commit 3831bfc0 authored by Niels Möller's avatar Niels Möller

* src/testsuite/ssh1-fallback-test: New test.

* src/testsuite/lshg-cat-test: New test.

* src/testsuite/fake-sshd1: New file.

Rev: src/testsuite/fake-sshd1:1.1
Rev: src/testsuite/lshg-cat-test:1.1
Rev: src/testsuite/ssh1-fallback-test:1.1
parent 75834ea0
#! /bin/sh
# Fake ssh-server for use by the ssh1-fallback-test
inet_mode=no
version=''
echo 1>&2 fake-sshd1: starting
echo 1>&2 nargs = $#, args = "$@"
while [ $# -ne 0 ] ; do
case "$1" in
-i)
inet_mode=yes
;;
-V)
shift
version=$1
;;
*)
echo 1>&2 fake-sshd1: Invalid argument "$1"
exit 1
;;
esac
shift
done
echo 1>&2 fake-sshd1: Received version "$version"
echo 1>&2 fake-sshd1: inet_mode = "$inet_mode"
if [ "$inet_mode" != yes ] ; then exit 1; fi
case "$version" in
SSH-1.*)
echo SSH-1.99-fake-sshd1
echo a-packet
;;
*)
exit 1
;;
esac
#! /bin/sh
# Tests connecting with lsh. In order to use this, you must already
# have lsh set up so that you can login without password.
# This restriction can be fixed if we add an option to lshd to use a
# custom passwd-file.
echo lshg, cat test
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
. $srcdir/functions.sh
spawn_lshd && spawn_lsh -G && exec_lshg "cat `pwd`/../lshd" > test.out1
cat ../lshd > test.out2
compare_output "lsh-cat-test"
#! /bin/sh
# Tests the ssh-1 fallback mechanism
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
. $srcdir/functions.sh
spawn_lshd --ssh1-fallback=$srcdir/fake-sshd1 \
&& echo "SSH-1.5-ssh1-fallback-test" \
| tcpconnect localhost $PORT \
| grep -q a-packet && test_success
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment