blob: 6f952f4e4acd56bb0f1adda9c9c3628f8fc7c5ec [file] [log] [blame]
Damien Milleredb1af52014-05-15 15:07:53 +10001# $OpenBSD: kextype.sh,v 1.5 2014/04/21 22:15:37 djm 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.
11ALLKEX=`ssh -Q kex`
12KEXOPT=`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