termal.in

← Blog

Manage an OpenWrt router remotely, without opening its SSH

· Termalin Team openwrtrouterconnectorremote-accessiot

You admin an OpenWrt router that isn’t in front of you — a branch office, a relative’s house, a remote site on someone else’s uplink. You want a root shell and LuCI from wherever you are, maybe you want an AI agent to check it, and you absolutely do not want to port-forward the router’s SSH or web UI to the internet. Here’s how to reach an OpenWrt box behind NAT from a browser or from Claude/ChatGPT, leaving dropbear and your own login exactly as they are.

Why not expose the router’s SSH or LuCI

A router is the edge, so exposing its management ports is the worst place to be careless. Forward port 22 and dropbear takes brute-force traffic from the moment it’s reachable; forward LuCI and you’ve put a web admin panel — one that configures the firewall — in front of every scanner on the internet. And most remote sites are behind carrier-grade NAT anyway, so there’s often no port to forward even if you wanted to. The safe shape is the opposite: the router dials out, and you reach it through that outbound link.

One line on the router

A Termalin Connector is a small static binary that dials out and holds the link open — no inbound port. OpenWrt has no curl in its base, so the installer uses wget. As root on the router:

wget -qO- https://termal.in/i/<token> | sh

Get the token from the cabinet (Servers → Add a server → type Connector → Get install command). The line downloads the build for the router’s processor, enrolls it, installs a procd service enabled at boot, and connects.

What it does to the router is deliberately minimal:

  • dropbear and your own login don’t change. dropbear keeps port 22 and all its settings. The installer adds OpenSSH’s sshd next to it, listening only on 127.0.0.1:2222, because dropbear can’t accept Termalin’s certificate sign-in and OpenSSH can. Nothing new listens on a public interface.
  • It’s a proper service. procd respawns the Connector if it crashes and starts it at boot, so a power cut or a firmware quirk doesn’t leave you locked out. Logs go to logread.

Which routers — ARM and MIPS

The installer reads the processor (for MIPS it even checks the ELF byte-order of /bin/sh, since uname -m says mips for both) and picks the right static musl build:

Router classConnector build
ARM routers (most modern APs, armv7)termalin-agent-armv7, ~3.6 MB
64-bit ARM routers (arm64)termalin-agent-aarch64, ~3.9 MB
MIPS little-endian (MediaTek MT7621 and similar)termalin-agent-mipsel, ~5.2 MB
MIPS big-endian (Atheros / Qualcomm)termalin-agent-mips, ~5.2 MB

Flash budget. You need roughly 6–8 MB of free flash: the Connector (3.6–5.2 MB) plus OpenSSH and its libraries (~5 MB unpacked, 2–3 MB on the compressed overlay). That’s comfortable on 16 MB-and-up routers; 8 MB boards don’t fit. RAM use is a few MB. Tested on OpenWrt 24.10 (opkg) and 25.12 (apk).

No key left on the router

Enrollment makes the router’s OpenSSH trust Termalin’s SSH certificate authority, and every login uses a short-lived certificate scoped to your account. There’s no long-lived private key stored on the box to steal, and a certificate minted for any other account is refused even though the host trusts the shared CA.

What you reach through it

  • A root shell in the web terminal — from a laptop, a phone, anywhere.
  • LuCI without exposing it. Reach the router’s web UI at a private address through internal sites — you get the admin panel in a browser tab, with nothing published to the internet.
  • An AI agent. Point Claude, ChatGPT or Cursor at the router through the hosted MCP endpoint to read logs, check an interface or confirm a config — keyless, and every command audited. Across several sites, see managing an IoT fleet with AI over MCP.
  • Monitoring and alerts for a box with no open port.

Honest about the edges

  • MIPS is tested under emulation, not yet on a physical router. The MIPS builds pass the full install-and-tunnel matrix as binaries under qemu-user — enrol, stay connected, run a command through the tunnel — but we haven’t run them on physical MediaTek or Atheros hardware yet. The ARM builds are emulator-tested the same way. A static musl binary that works under emulation behaves the same on the metal, but that’s the honest status.
  • No container route on MIPS. MIPS routers can’t run a container runtime, so there’s no Docker image for them — use the one-line installer above. (For routers that do run containers, like MikroTik RouterOS 7, see the Connector in Docker.)
  • Very old cores and tiny flash are out. Pre-MIPS32r2 cores (very old Broadcom/Atheros) and 8 MB-flash boards aren’t supported: an old core won’t start the binary, and a full overlay stops the install, so check your chip and free space (df -h /overlay) first.
  • You reach the router through Termalin’s hosted side, not a raw ssh root@…, and the Connector needs Pro or the 14-day trial.

The underlying idea

It’s the same reversal that makes any device behind NAT reachable safely: never open an inbound port on the edge, let it reach out instead. The full set of approaches — reverse tunnels, mesh VPNs, Cloudflare Tunnel and the outbound Connector — is laid out in SSH behind NAT or CGNAT without port forwarding. The same technique reaches a Raspberry Pi behind home NAT.


Termalin is a free, cross-platform SSH client with a web terminal and a keyless Connector for routers and edge devices — download it, or read the security model.

Try it on one host.

Termalin is a fast SSH client for you — and your agents.

Free tier · 14-day Pro trial · pricing

Add Termalin as a preferred source on Google