]> andersk Git - gssapi-openssh.git/blame - openssh/regress/ssh-com.sh
Import of OpenSSH 3.7p1
[gssapi-openssh.git] / openssh / regress / ssh-com.sh
CommitLineData
0fff78ff 1# $OpenBSD: ssh-com.sh,v 1.5 2003/05/14 22:08:27 markus Exp $
700318f3 2# Placed in the Public Domain.
3
4tid="connect to ssh.com server"
5
6#TEST_COMBASE=/path/to/ssh/com/binaries
7if [ "X${TEST_COMBASE}" = "X" ]; then
8 fatal '$TEST_COMBASE is not set'
9fi
10
11VERSIONS="
12 2.0.12
13 2.0.13
14 2.1.0
15 2.2.0
16 2.3.0
700318f3 17 2.4.0
18 3.0.0
6a9b3198 19 3.1.0
20 3.2.0
0fff78ff 21 3.2.2
22 3.2.3
6a9b3198 23 3.3.0"
700318f3 24# 2.0.10 does not support UserConfigDirectory
6a9b3198 25# 2.3.1 requires a config in $HOME/.ssh2
700318f3 26
27SRC=`dirname ${SCRIPT}`
28
29# ssh.com
30cat << EOF > $OBJ/sshd2_config
6a9b3198 31#*:
700318f3 32 # Port and ListenAdress are not used.
33 QuietMode yes
34 Port 4343
35 ListenAddress 127.0.0.1
36 UserConfigDirectory ${OBJ}/%U
37 Ciphers AnyCipher
38 PubKeyAuthentication yes
39 #AllowedAuthentications publickey
40 AuthorizationFile authorization
41 HostKeyFile ${SRC}/dsa_ssh2.prv
42 PublicHostKeyFile ${SRC}/dsa_ssh2.pub
43 RandomSeedFile ${OBJ}/random_seed
44 MaxConnections 0
45 PermitRootLogin yes
46 VerboseMode no
47 CheckMail no
48 Ssh1Compatibility no
49EOF
50
51# create client config
52sed "s/HostKeyAlias.*/HostKeyAlias ssh2-localhost-with-alias/" \
53 < $OBJ/ssh_config > $OBJ/ssh_config_com
54
55# we need a DSA key for
56rm -f ${OBJ}/dsa ${OBJ}/dsa.pub
57${SSHKEYGEN} -q -N '' -t dsa -f ${OBJ}/dsa
58
59# setup userdir, try rsa first
60mkdir -p ${OBJ}/${USER}
61cp /dev/null ${OBJ}/${USER}/authorization
62for t in rsa dsa; do
63 ${SSHKEYGEN} -e -f ${OBJ}/$t.pub > ${OBJ}/${USER}/$t.com
64 echo Key $t.com >> ${OBJ}/${USER}/authorization
65 echo IdentityFile ${OBJ}/$t >> ${OBJ}/ssh_config_com
66done
67
68# convert and append DSA hostkey
69(
0fff78ff 70 echon 'ssh2-localhost-with-alias,127.0.0.1,::1 '
700318f3 71 ${SSHKEYGEN} -if ${SRC}/dsa_ssh2.pub
72) >> $OBJ/known_hosts
73
74# go for it
75for v in ${VERSIONS}; do
76 sshd2=${TEST_COMBASE}/${v}/sshd2
77 if [ ! -x ${sshd2} ]; then
78 continue
79 fi
80 trace "sshd2 ${v}"
81 PROXY="proxycommand ${sshd2} -qif ${OBJ}/sshd2_config 2> /dev/null"
82 ${SSH} -qF ${OBJ}/ssh_config_com -o "${PROXY}" dummy exit 0
83 if [ $? -ne 0 ]; then
84 fail "ssh connect to sshd2 ${v} failed"
85 fi
86
87 ciphers="3des-cbc blowfish-cbc arcfour"
88 macs="hmac-md5"
89 case $v in
90 2.4.*)
91 ciphers="$ciphers cast128-cbc"
92 macs="$macs hmac-sha1 hmac-sha1-96 hmac-md5-96"
93 ;;
94 3.*)
95 ciphers="$ciphers aes128-cbc cast128-cbc"
96 macs="$macs hmac-sha1 hmac-sha1-96 hmac-md5-96"
97 ;;
98 esac
99 #ciphers="3des-cbc"
100 for m in $macs; do
101 for c in $ciphers; do
102 trace "sshd2 ${v} cipher $c mac $m"
103 verbose "test ${tid}: sshd2 ${v} cipher $c mac $m"
104 ${SSH} -c $c -m $m -qF ${OBJ}/ssh_config_com -o "${PROXY}" dummy exit 0
105 if [ $? -ne 0 ]; then
106 fail "ssh connect to sshd2 ${v} with $c/$m failed"
107 fi
108 done
109 done
110done
111
112rm -rf ${OBJ}/${USER}
113for i in sshd_config_proxy ssh_config_proxy random_seed \
114 sshd2_config dsa.pub dsa ssh_config_com; do
115 rm -f ${OBJ}/$i
116done
This page took 0.062101 seconds and 5 git commands to generate.