From 64c00680b2c4baff4c2a39be81470ac3f8b8fb1f Mon Sep 17 00:00:00 2001 From: fatedier Date: Mon, 19 Feb 2024 11:42:58 +0800 Subject: [PATCH] update multiple-ssh-over-same-port (#74) --- .gitignore | 1 + content/zh-cn/docs/Examples/multiple-ssh-over-same-port.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 48b779e..97fd289 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ public/ resources/ node_modules/ .hugo_build.lock +.DS_Store diff --git a/content/zh-cn/docs/Examples/multiple-ssh-over-same-port.md b/content/zh-cn/docs/Examples/multiple-ssh-over-same-port.md index 954a6cc..f826566 100644 --- a/content/zh-cn/docs/Examples/multiple-ssh-over-same-port.md +++ b/content/zh-cn/docs/Examples/multiple-ssh-over-same-port.md @@ -55,13 +55,13 @@ description: > 使用 SSH ProxyCommand 访问内网机器 A,假设用户名为 test。使用以下命令: ```bash - ssh -o 'proxycommand socat - PROXY:x.x.x.x:machine-a.example.com:22,proxyport=5002' test@machine-a + ssh -o 'proxycommand socat - PROXY:x.x.x.x:%h:%p,proxyport=5002' test@machine-a.example.com ``` 要访问内网机器 B,只需更改域名,假设用户名仍然为 test: ```bash - ssh -o 'proxycommand socat - PROXY:x.x.x.x:machine-b.example.com:22,proxyport=5002' test@machine-b + ssh -o 'proxycommand socat - PROXY:x.x.x.x:%h:%p,proxyport=5002' test@machine-b.example.com ``` 通过按照以上步骤进行配置,您可以实现多个 SSH 服务复用同一端口,以便在具有公网 IP 的机器上进行访问。