File contents 网易UU远程 端口映射隧道(FRP 替代)
网易UU远程(硬件/被控端在线)提供 TCP 隧道穿透:把被控设备(或其所在局域网内任意主机)的 TCP 服务映射到本机端口。纯私有,省 FRP 公网流量。仅支持 TCP (SSH/MySQL/HTTPS 可用,UDP 不行)。
核心配置
字段
说明
目标服务地址
被控机可达的 IP。填 127.0.0.1 表示被控机自身服务;填局域网 IP(如 10.1.201.228)则经被控机转发到那台机器
目标服务端口
远端服务端口
本地访问端口
映射到本机,访问 127.0.0.1:该端口
映射依赖被控端活跃连接,关闭面板/断连即失效 (官方 FAQ 明说)。
关键坑(都实测遇到过)
本地访问端口和 UU 面板状态 :新建/改规则可能不即时生效——Connection refused 时先关掉端口映射面板再重开,状态变「映射成功」即可用。
known_hosts 端口残留 :同一 [host]:port 换了 sshd 指纹会卡 REMOTE HOST IDENTIFICATION HAS CHANGED。修:ssh-keygen -R '[127.0.0.1]:2222'。
跳板连通性测试 :DO NOT rely on ping (常被禁)。用 timeout 6 bash -c 'echo > /dev/tcp/IP/22' && echo REACHABLE || echo UNREACHABLE。
WSL2 作为被控机(sshd 跑在 WSL)
最大的坑:Windows 的 OpenSSH Server 占着 host 22 端口 ,且 WSL2 的 localhost 转发会把 ssh localhost(在 WSL 内)也导向 Windows 的 sshd ——它不会显示在 WSL 里的 ss -tlnp (ss/ps 都查不到,但 bind 时报 address already in use)。诊断靠 host key 指纹变化。
处置:
把 WSL 的 sshd 放到非 22 端口,如 echo 'Port 2222' | sudo tee -a /etc/ssh/sshd_config
UU 映射目标填 127.0.0.1:2222——WSL2 localhost 转发把 Windows 的 127.0.0.1:2222 透进 WSL,地址稳定不变,不用改规则
Arch WSL:sudo systemctl enable --now sshd,失败先 sudo ssh-keygen -A 补 host key、sudo mkdir -p /run/sshd;若 sshd -D -d 报 address in use 就是 Windows 占 22,换端口而非折腾 systemd
见 references/wsl2-sshd-setup.md。
替换 FRP 的流程
现有 FRP SSH 登上服务器查内网 IP:ssh school "ip addr show | grep 'inet '"
跳板机测 REACHABLE(见上)确认能直连
UU 加映射:目标 = 服务器内网 IP:22,本地映射端口
改 ~/.ssh/config 对应 Host → HostName 127.0.0.1 / Port <本地端口>
ssh school 通了再停 FRP(确认无他人共用该 FRP 入口)
安全
密钥登录优先:忘了密码时不能远程绕密码,先用 UU 远程桌面开终端把本机公钥追加到 ~/.ssh/authorized_keys
验证免密后可选 PasswordAuthentication no 关密码登录
UU 是私有隧道:别用于对外发布;他人也要连时保留 FRP
1 --- 2 name: uu-remote-tunnel 3 description: Uu Remote Tunnel 4 --- 5 6 # 网易UU远程 端口映射隧道(FRP 替代) 7 8 网易UU远程(硬件/被控端在线)提供 TCP 隧道穿透:把被控设备(或其所在局域网内任意主机)的 TCP 服务映射到本机端口。纯私有,省 FRP 公网流量。**仅支持 TCP**(SSH/MySQL/HTTPS 可用,UDP 不行)。 9 10 ## 核心配置 11 12 | 字段 | 说明 | 13 |---|---| 14 | 目标服务地址 | 被控机可达的 IP。填 `127.0.0.1` 表示被控机自身服务;填局域网 IP(如 `10.1.201.228`)则经被控机转发到那台机器 | 15 | 目标服务端口 | 远端服务端口 | 16 | 本地访问端口 | 映射到本机,访问 `127.0.0.1:该端口` | 17 18 映射依赖被控端活跃连接,**关闭面板/断连即失效**(官方 FAQ 明说)。 19 20 ## 关键坑(都实测遇到过) 21 22 1. **本地访问端口和 UU 面板状态**:新建/改规则可能不即时生效——`Connection refused` 时先关掉端口映射面板再重开,状态变「映射成功」即可用。 23 2. **known_hosts 端口残留**:同一 `[host]:port` 换了 sshd 指纹会卡 `REMOTE HOST IDENTIFICATION HAS CHANGED`。修:`ssh-keygen -R '[127.0.0.1]:2222'`。 24 3. **跳板连通性测试**:DO NOT rely on ping (常被禁)。用 `timeout 6 bash -c 'echo > /dev/tcp/IP/22' && echo REACHABLE || echo UNREACHABLE`。 25 26 ## WSL2 作为被控机(sshd 跑在 WSL) 27 28 **最大的坑:Windows 的 OpenSSH Server 占着 host 22 端口**,且 WSL2 的 localhost 转发会把 `ssh localhost`(在 WSL 内)也导向 **Windows 的 sshd**——它**不会显示在 WSL 里的 `ss -tlnp`**(`ss`/`ps` 都查不到,但 bind 时报 address already in use)。诊断靠 host key 指纹变化。 29 30 处置: 31 - 把 WSL 的 sshd 放到非 22 端口,如 `echo 'Port 2222' | sudo tee -a /etc/ssh/sshd_config` 32 - UU 映射目标填 `127.0.0.1:2222`——WSL2 localhost 转发把 Windows 的 127.0.0.1:2222 透进 WSL,地址稳定不变,不用改规则 33 - Arch WSL:`sudo systemctl enable --now sshd`,失败先 `sudo ssh-keygen -A` 补 host key、`sudo mkdir -p /run/sshd`;若 `sshd -D -d` 报 address in use 就是 Windows 占 22,换端口而非折腾 systemd 34 35 见 `references/wsl2-sshd-setup.md`。 36 37 ## 替换 FRP 的流程 38 39 1. 现有 FRP SSH 登上服务器查内网 IP:`ssh school "ip addr show | grep 'inet '"` 40 2. 跳板机测 `REACHABLE`(见上)确认能直连 41 3. UU 加映射:目标 = 服务器内网 IP:22,本地映射端口 42 4. 改 `~/.ssh/config` 对应 Host → `HostName 127.0.0.1 / Port <本地端口>` 43 5. `ssh school` 通了再停 FRP(确认无他人共用该 FRP 入口) 44 45 ## 安全 46 47 - 密钥登录优先:忘了密码时不能远程绕密码,先用 UU 远程桌面开终端把本机公钥追加到 `~/.ssh/authorized_keys` 48 - 验证免密后可选 `PasswordAuthentication no` 关密码登录 49 - UU 是私有隧道:别用于对外发布;他人也要连时保留 FRP
publieople/hermes-config-kit/tree/main/skills/devops/uu-remote-tunnel commit d1967c4cd0
Frequently asked questions How do I install the Uu Remote Tunnel skill? Run npx skillmds@latest add publieople/uu-remote-tunnel in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Uu Remote Tunnel skill do? Uu Remote Tunnel It is listed under Coding & Dev Tools on SkillMD.
Is Uu Remote Tunnel safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Uu Remote Tunnel? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Uu Remote Tunnel free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Uu Remote Tunnel? publieople (@publieople) published this skill. Their other Agent Skills are listed on their SkillMD profile.