forwarding.sh (204861) | forwarding.sh (239849) |
---|---|
1# $OpenBSD: forwarding.sh,v 1.7 2010/01/11 02:53:44 dtucker Exp $ | 1# $OpenBSD: forwarding.sh,v 1.8 2012/06/01 00:47:35 djm Exp $ |
2# Placed in the Public Domain. 3 4tid="local and remote forwarding" 5DATA=/bin/ls${EXEEXT} 6 7start_sshd 8 9base=33 --- 60 unchanged lines hidden (view full) --- 70 trace "clear local forward proto $p" 71 ${SSH} -$p -f -F $OBJ/ssh_config -L ${base}01:127.0.0.1:$PORT \ 72 -oClearAllForwardings=yes somehost sleep 10 73 if [ $? != 0 ]; then 74 fail "connection failed with cleared local forwarding" 75 else 76 # this one should fail 77 ${SSH} -$p -F $OBJ/ssh_config -p ${base}01 true \ | 2# Placed in the Public Domain. 3 4tid="local and remote forwarding" 5DATA=/bin/ls${EXEEXT} 6 7start_sshd 8 9base=33 --- 60 unchanged lines hidden (view full) --- 70 trace "clear local forward proto $p" 71 ${SSH} -$p -f -F $OBJ/ssh_config -L ${base}01:127.0.0.1:$PORT \ 72 -oClearAllForwardings=yes somehost sleep 10 73 if [ $? != 0 ]; then 74 fail "connection failed with cleared local forwarding" 75 else 76 # this one should fail 77 ${SSH} -$p -F $OBJ/ssh_config -p ${base}01 true \ |
78 2>${TEST_SSH_LOGFILE} && \ | 78 2>>$TEST_SSH_LOGFILE && \ |
79 fail "local forwarding not cleared" 80 fi 81 sleep 10 82 83 trace "clear remote forward proto $p" 84 ${SSH} -$p -f -F $OBJ/ssh_config -R ${base}01:127.0.0.1:$PORT \ 85 -oClearAllForwardings=yes somehost sleep 10 86 if [ $? != 0 ]; then 87 fail "connection failed with cleared remote forwarding" 88 else 89 # this one should fail 90 ${SSH} -$p -F $OBJ/ssh_config -p ${base}01 true \ | 79 fail "local forwarding not cleared" 80 fi 81 sleep 10 82 83 trace "clear remote forward proto $p" 84 ${SSH} -$p -f -F $OBJ/ssh_config -R ${base}01:127.0.0.1:$PORT \ 85 -oClearAllForwardings=yes somehost sleep 10 86 if [ $? != 0 ]; then 87 fail "connection failed with cleared remote forwarding" 88 else 89 # this one should fail 90 ${SSH} -$p -F $OBJ/ssh_config -p ${base}01 true \ |
91 2>${TEST_SSH_LOGFILE} && \ | 91 2>>$TEST_SSH_LOGFILE && \ |
92 fail "remote forwarding not cleared" 93 fi 94 sleep 10 95done 96 97for p in 2; do 98 trace "stdio forwarding proto $p" 99 cmd="${SSH} -$p -F $OBJ/ssh_config" 100 $cmd -o "ProxyCommand $cmd -q -W localhost:$PORT somehost" \ 101 somehost true 102 if [ $? != 0 ]; then 103 fail "stdio forwarding proto $p" 104 fi 105done | 92 fail "remote forwarding not cleared" 93 fi 94 sleep 10 95done 96 97for p in 2; do 98 trace "stdio forwarding proto $p" 99 cmd="${SSH} -$p -F $OBJ/ssh_config" 100 $cmd -o "ProxyCommand $cmd -q -W localhost:$PORT somehost" \ 101 somehost true 102 if [ $? != 0 ]; then 103 fail "stdio forwarding proto $p" 104 fi 105done |