blob: 9444f7fb619ebc4141a798c7d69cbc88fe02f8ab [file] [log] [blame]
djm@openbsd.orgdd369322017-04-30 23:34:55 +00001# $OpenBSD: host-expand.sh,v 1.5 2017/04/30 23:34:55 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
djm@openbsd.orgdd369322017-04-30 23:34:55 +000014${SSH} -F $OBJ/ssh_proxy somehost true >$OBJ/actual
15diff $OBJ/expect $OBJ/actual || fail "$tid"
Damien Miller7d06b002011-01-07 09:54:20 +110016