xref: /freebsd/crypto/openssh/regress/proxy-connect.sh (revision 43a5ec4eb41567cc92586503212743d89686d78f)
1#	$OpenBSD: proxy-connect.sh,v 1.12 2020/01/23 11:19:12 dtucker Exp $
2#	Placed in the Public Domain.
3
4tid="proxy connect"
5
6if [ "`${SSH} -Q compression`" = "none" ]; then
7	comp="no"
8else
9	comp="no yes"
10fi
11
12for c in $comp; do
13	verbose "plain username comp=$c"
14	opts="-oCompression=$c -F $OBJ/ssh_proxy"
15	SSH_CONNECTION=`${SSH} $opts 999.999.999.999 'echo $SSH_CONNECTION'`
16	if [ $? -ne 0 ]; then
17		fail "ssh proxyconnect comp=$c failed"
18	fi
19	if [ "$SSH_CONNECTION" != "UNKNOWN 65535 UNKNOWN 65535" ]; then
20		fail "bad SSH_CONNECTION comp=$c: " \
21		    "$SSH_CONNECTION"
22	fi
23done
24
25verbose "username with style"
26${SSH} -F $OBJ/ssh_proxy ${USER}:style@999.999.999.999 true || \
27	fail "ssh proxyconnect failed"
28