proxy-connect.sh 703 B

12345678910111213141516171819202122232425262728
  1. # $OpenBSD: proxy-connect.sh,v 1.12 2020/01/23 11:19:12 dtucker Exp $
  2. # Placed in the Public Domain.
  3. tid="proxy connect"
  4. if [ "$(${SSH} -Q compression)" = "none" ]; then
  5. comp="no"
  6. else
  7. comp="no yes"
  8. fi
  9. for c in $comp; do
  10. verbose "plain username comp=$c"
  11. opts="-oCompression=$c -F $OBJ/ssh_proxy"
  12. SSH_CONNECTION=$(${SSH} $opts 999.999.999.999 'echo $SSH_CONNECTION')
  13. if [ $? -ne 0 ]; then
  14. fail "ssh proxyconnect comp=$c failed"
  15. fi
  16. if [ "$SSH_CONNECTION" != "UNKNOWN 65535 UNKNOWN 65535" ]; then
  17. fail "bad SSH_CONNECTION comp=$c: " \
  18. "$SSH_CONNECTION"
  19. fi
  20. done
  21. verbose "username with style"
  22. ${SSH} -F $OBJ/ssh_proxy ${USER}:style@999.999.999.999 true ||
  23. fail "ssh proxyconnect failed"