2015-03-03 22:35:19 +00:00
|
|
|
# $OpenBSD: host-expand.sh,v 1.4 2015/03/03 22:35:19 markus Exp $
|
2011-01-06 22:54:20 +00:00
|
|
|
# Placed in the Public Domain.
|
|
|
|
|
|
|
|
tid="expand %h and %n"
|
|
|
|
|
|
|
|
echo 'PermitLocalCommand yes' >> $OBJ/ssh_proxy
|
|
|
|
printf 'LocalCommand printf "%%%%s\\n" "%%n" "%%h"\n' >> $OBJ/ssh_proxy
|
|
|
|
|
2011-01-10 20:56:26 +00:00
|
|
|
cat >$OBJ/expect <<EOE
|
2011-01-06 22:54:20 +00:00
|
|
|
somehost
|
|
|
|
127.0.0.1
|
|
|
|
EOE
|
|
|
|
|
2015-03-03 22:35:19 +00:00
|
|
|
for p in ${SSH_PROTOCOLS}; do
|
2011-01-06 22:54:20 +00:00
|
|
|
verbose "test $tid: proto $p"
|
2011-01-10 20:56:26 +00:00
|
|
|
${SSH} -F $OBJ/ssh_proxy -$p somehost true >$OBJ/actual
|
|
|
|
diff $OBJ/expect $OBJ/actual || fail "$tid proto $p"
|
2011-01-06 22:54:20 +00:00
|
|
|
done
|
|
|
|
|