diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2020-01-24 10:08:17 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2020-01-25 11:50:34 +1100 |
commit | b2df804f571d77b07059f087b90955ffbc2f67d4 (patch) | |
tree | fe36b9e93b6e2db5e550a91acf6a88c4952eaccc | |
parent | c6f06fd38a257b9fcc7d6760f8fb6d505dccb628 (diff) |
upstream: Add a connection test for proxycommand. This would have
caught the problem caused by ssh.c rev 1.507 wherein Host and Hostname were
swapped. Prompted by beck@
OpenBSD-Regress-ID: d218500ae6aca4c479c27318fb5b09ebc00f7aae
-rw-r--r-- | regress/connect.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/regress/connect.sh b/regress/connect.sh index 1b344b603..5e492b86d 100644 --- a/regress/connect.sh +++ b/regress/connect.sh | |||
@@ -1,11 +1,20 @@ | |||
1 | # $OpenBSD: connect.sh,v 1.6 2017/04/30 23:34:55 djm Exp $ | 1 | # $OpenBSD: connect.sh,v 1.7 2020/01/24 10:08:17 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="simple connect" | 4 | tid="simple connect" |
5 | 5 | ||
6 | NC=nc | ||
7 | |||
6 | start_sshd | 8 | start_sshd |
7 | 9 | ||
10 | trace "direct connect" | ||
8 | ${SSH} -F $OBJ/ssh_config somehost true | 11 | ${SSH} -F $OBJ/ssh_config somehost true |
9 | if [ $? -ne 0 ]; then | 12 | if [ $? -ne 0 ]; then |
10 | fail "ssh connect with failed" | 13 | fail "ssh direct connect failed" |
14 | fi | ||
15 | |||
16 | trace "proxy connect" | ||
17 | ${SSH} -F $OBJ/ssh_config -o "proxycommand $NC %h %p" somehost true | ||
18 | if [ $? -ne 0 ]; then | ||
19 | fail "ssh proxycommand connect failed" | ||
11 | fi | 20 | fi |