summaryrefslogtreecommitdiff
path: root/regress/usr.bin/ssh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2013-06-10 21:56:44 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2013-06-10 21:56:44 +0000
commit6a0e2e592e08b5c1233bd156832e2d5d645c6daf (patch)
treeeafe768c34504e355de83e99dc79d2931681f5f9 /regress/usr.bin/ssh
parent287f2a50e689d5649d0aed727be0fe5494f7469e (diff)
Add test for forward config parsing
Diffstat (limited to 'regress/usr.bin/ssh')
-rw-r--r--regress/usr.bin/ssh/forwarding.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/forwarding.sh b/regress/usr.bin/ssh/forwarding.sh
index 2ba140feedc..f9c261bc756 100644
--- a/regress/usr.bin/ssh/forwarding.sh
+++ b/regress/usr.bin/ssh/forwarding.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: forwarding.sh,v 1.10 2013/05/17 04:29:14 dtucker Exp $
+# $OpenBSD: forwarding.sh,v 1.11 2013/06/10 21:56:43 dtucker Exp $
# Placed in the Public Domain.
tid="local and remote forwarding"
@@ -102,3 +102,18 @@ for p in 2; do
fail "stdio forwarding proto $p"
fi
done
+
+echo "LocalForward ${base}01 127.0.0.1:$PORT" >> ssh_config
+echo "RemoteForward ${base}02 127.0.0.1:${base}01" >> ssh_config
+for p in 1 2; do
+ trace "config file: start forwarding, fork to background"
+ ${SSH} -$p -F $OBJ/ssh_config -f somehost sleep 10
+
+ trace "config file: transfer over forwarded channels and check result"
+ ${SSH} -F $OBJ/ssh_config -p${base}02 -o 'ConnectionAttempts=4' \
+ somehost cat ${DATA} > ${COPY}
+ test -f ${COPY} || fail "failed copy of ${DATA}"
+ cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}"
+
+ wait
+done