4 How to use ssh tunnel
ZHAO Xudong edited this page 2026-01-21 18:44:29 +08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

How to Use SSH Tunnel

Language / 语言: English | 中文


English

When creating ssh bookmark, could set ssh tunnel to forward local request to remote server, or forward remote server request to local.

Examples:

  • Set remote port 6000, local port 5000, set forward local request to remote, then when visiting http://127.0.0.1:5000, would get content from remote-server:6000, equals "ssh -L"
  • Set remote port 6000, local port 5000, set forward remote request to local, then when visiting http://remote-server:6000, would get content from http://127.0.0.1:5000, equals "ssh -R"

Screen Shot 2023-08-03 at 11 37 32 Screen Shot 2023-08-03 at 11 37 48

中文

在创建 SSH 书签时,可以设置 SSH 隧道来转发本地请求到远程服务器,或转发远程服务器请求到本地。

示例:

  • 设置远程端口 6000本地端口 5000设置转发本地请求到远程然后当访问 http://127.0.0.1:5000 时,会获取远程服务器:6000 的内容,等同于 "ssh -L"
  • 设置远程端口 6000本地端口 5000设置转发远程请求到本地然后当访问 http://remote-server:6000 时,会获取 http://127.0.0.1:5000 的内容,等同于 "ssh -R"

Screen Shot 2023-08-03 at 11 37 32 Screen Shot 2023-08-03 at 11 37 48