1 # $OpenBSD: kextype.sh,v 1.6 2015/03/24 20:19:15 markus Exp $ 2 # Placed in the Public Domain. 3 4 tid="login with different key exchange algorithms" 5 6 TIME=/usr/bin/time 7 cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak 8 cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak 9 10 # Make server accept all key exchanges. 11 ALLKEX=`${SSH} -Q kex` 12 KEXOPT=`echo $ALLKEX | tr ' ' ,` 13 echo "KexAlgorithms=$KEXOPT" >> $OBJ/sshd_proxy 14 15 tries="1 2 3 4" 16 for 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 24 done 25 26