2017-05-01 01:34:55 +02:00
|
|
|
# $OpenBSD: host-expand.sh,v 1.5 2017/04/30 23:34:55 djm Exp $
|
2011-01-06 23:54:20 +01: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 21:56:26 +01:00
|
|
|
cat >$OBJ/expect <<EOE
|
2011-01-06 23:54:20 +01:00
|
|
|
somehost
|
|
|
|
127.0.0.1
|
|
|
|
EOE
|
|
|
|
|
2017-05-01 01:34:55 +02:00
|
|
|
${SSH} -F $OBJ/ssh_proxy somehost true >$OBJ/actual
|
|
|
|
diff $OBJ/expect $OBJ/actual || fail "$tid"
|
2011-01-06 23:54:20 +01:00
|
|
|
|