blob: 6cc0e6055eaea22d7eaed3e1ef4001b451dc09a1 [file] [log] [blame]
Damien Millerc83fdf32014-02-28 10:34:03 +11001# $OpenBSD: host-expand.sh,v 1.3 2014/02/27 23:17:41 djm Exp $
Damien Miller7d06b002011-01-07 09:54:20 +11002# Placed in the Public Domain.
3
4tid="expand %h and %n"
5
6echo 'PermitLocalCommand yes' >> $OBJ/ssh_proxy
7printf 'LocalCommand printf "%%%%s\\n" "%%n" "%%h"\n' >> $OBJ/ssh_proxy
8
Tim Rice076a3b92011-01-10 12:56:26 -08009cat >$OBJ/expect <<EOE
Damien Miller7d06b002011-01-07 09:54:20 +110010somehost
11127.0.0.1
12EOE
13
14for p in 1 2; do
15 verbose "test $tid: proto $p"
Tim Rice076a3b92011-01-10 12:56:26 -080016 ${SSH} -F $OBJ/ssh_proxy -$p somehost true >$OBJ/actual
17 diff $OBJ/expect $OBJ/actual || fail "$tid proto $p"
Damien Miller7d06b002011-01-07 09:54:20 +110018done
19