1# $OpenBSD: kextype.sh,v 1.6 2015/03/24 20:19:15 markus Exp $ 2# 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 10# Make server accept all key exchanges. 11ALLKEX=`${SSH} -Q kex` 12KEXOPT=`echo $ALLKEX | tr ' ' ,` 13echo "KexAlgorithms=$KEXOPT" >> $OBJ/sshd_proxy 14 15tries="1 2 3 4" 16for k in `${SSH} -Q kex`; do 17 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 26