diff options
author | djm@openbsd.org <djm@openbsd.org> | 2017-10-04 18:50:23 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-10-05 05:51:46 +1100 |
commit | a66714508b86d6814e9055fefe362d9fe4d49ab3 (patch) | |
tree | 9e3816385d2bda816dc15dda8f9461fc96f3a279 /regress/cfgmatch.sh | |
parent | 609ecc8e57eb88e2eac976bd3cae7f7889aaeff6 (diff) |
upstream commit
exercise PermitOpen a little more thoroughly
Upstream-Regress-ID: f41592334e227a4c1f9a983044522de4502d5eac
Diffstat (limited to 'regress/cfgmatch.sh')
-rw-r--r-- | regress/cfgmatch.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/regress/cfgmatch.sh b/regress/cfgmatch.sh index 2504d04f4..dd11e404d 100644 --- a/regress/cfgmatch.sh +++ b/regress/cfgmatch.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: cfgmatch.sh,v 1.10 2017/04/30 23:34:55 djm Exp $ | 1 | # $OpenBSD: cfgmatch.sh,v 1.11 2017/10/04 18:50:23 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="sshd_config match" | 4 | tid="sshd_config match" |
@@ -41,7 +41,7 @@ stop_client() | |||
41 | cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak | 41 | cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak |
42 | echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_config | 42 | echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_config |
43 | echo "Match Address 127.0.0.1" >>$OBJ/sshd_config | 43 | echo "Match Address 127.0.0.1" >>$OBJ/sshd_config |
44 | echo "PermitOpen 127.0.0.1:$PORT" >>$OBJ/sshd_config | 44 | echo "PermitOpen 127.0.0.1:2 127.0.0.1:3 127.0.0.1:$PORT" >>$OBJ/sshd_config |
45 | 45 | ||
46 | grep -v AuthorizedKeysFile $OBJ/sshd_proxy_bak > $OBJ/sshd_proxy | 46 | grep -v AuthorizedKeysFile $OBJ/sshd_proxy_bak > $OBJ/sshd_proxy |
47 | echo "AuthorizedKeysFile /dev/null" >>$OBJ/sshd_proxy | 47 | echo "AuthorizedKeysFile /dev/null" >>$OBJ/sshd_proxy |
@@ -49,7 +49,7 @@ echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_proxy | |||
49 | echo "Match user $USER" >>$OBJ/sshd_proxy | 49 | echo "Match user $USER" >>$OBJ/sshd_proxy |
50 | echo "AuthorizedKeysFile /dev/null $OBJ/authorized_keys_%u" >>$OBJ/sshd_proxy | 50 | echo "AuthorizedKeysFile /dev/null $OBJ/authorized_keys_%u" >>$OBJ/sshd_proxy |
51 | echo "Match Address 127.0.0.1" >>$OBJ/sshd_proxy | 51 | echo "Match Address 127.0.0.1" >>$OBJ/sshd_proxy |
52 | echo "PermitOpen 127.0.0.1:$PORT" >>$OBJ/sshd_proxy | 52 | echo "PermitOpen 127.0.0.1:2 127.0.0.1:3 127.0.0.1:$PORT" >>$OBJ/sshd_proxy |
53 | 53 | ||
54 | start_sshd | 54 | start_sshd |
55 | 55 | ||