host-expand.sh 386 B

12345678910111213141516
  1. # $OpenBSD: host-expand.sh,v 1.5 2017/04/30 23:34:55 djm Exp $
  2. # Placed in the Public Domain.
  3. tid="expand %h and %n"
  4. echo 'PermitLocalCommand yes' >> $OBJ/ssh_proxy
  5. printf 'LocalCommand printf "%%%%s\\n" "%%n" "%%h"\n' >> $OBJ/ssh_proxy
  6. cat > $OBJ/expect << EOE
  7. somehost
  8. 127.0.0.1
  9. EOE
  10. ${SSH} -F $OBJ/ssh_proxy somehost true > $OBJ/actual
  11. diff $OBJ/expect $OBJ/actual || fail "$tid"