blob: e27189904bbb0eb4f57de5e97f5c1036b564f481 [file] [log] [blame]
markus@openbsd.org9e1777a2015-03-24 20:19:15 +00001# $OpenBSD: kextype.sh,v 1.6 2015/03/24 20:19:15 markus Exp $
Damien Miller3a0e9f62010-11-05 10:16:34 +11002# Placed in the Public Domain.
3
4tid="login with different key exchange algorithms"
5
6TIME=/usr/bin/time
7cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
8cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak
9
Damien Milleredb1af52014-05-15 15:07:53 +100010# Make server accept all key exchanges.
markus@openbsd.org9e1777a2015-03-24 20:19:15 +000011ALLKEX=`${SSH} -Q kex`
Damien Milleredb1af52014-05-15 15:07:53 +100012KEXOPT=`echo $ALLKEX | tr ' ' ,`
13echo "KexAlgorithms=$KEXOPT" >> $OBJ/sshd_proxy
14
Damien Miller3a0e9f62010-11-05 10:16:34 +110015tries="1 2 3 4"
Darren Tucker6e9d6f42013-11-07 15:32:37 +110016for k in `${SSH} -Q kex`; do
Damien Miller3a0e9f62010-11-05 10:16:34 +110017 verbose "kex $k"
18 for i in $tries; do
19 ${SSH} -F $OBJ/ssh_proxy -o KexAlgorithms=$k x true
20 if [ $? -ne 0 ]; then
21 fail "ssh kex $k"
22 fi
23 done
24done
25