[Prompt] custom: I've built a system called Canopy. It's a self-hosted gateway for AI agents: it started as progressi | Hosts: corn, herman
[Response] Corn: Daniel's been building again. This time it's Canopy, his self-hosted gateway for AI agents — one connector, one user-level connection, and the gateway holds the credentials and dials out to everything: home network tools, cloud APIs, remote VPSs. And the question he sent is about the wiring behind those dials.
Herman: He can do it all over Tailscale with a central hub, or go old school with a classic SSH jump host, a bastion. He wants the pros and cons of each, how you actually set one up, and what you'd want to know before you commit.
Corn: Which sounds like a networking question, and mostly is. But underneath it there's a better one: what is a single front door actually for, and which kind should Daniel build? Because both of these designs put one box between the agent and everything else, and they disagree about what that box is for.
Herman: And Canopy is the perfect forcing case, because the client holding the connection is a machine doing things while nobody watches. Whatever sits in the middle has to work unattended.
Corn: So let's take the pattern itself first. Bastion host — talk about what the word means.
Herman: It's a fortification metaphor, and the definition is almost poetic in its plainness: a special-purpose computer designed and configured to withstand attacks. One job, one process, everything else stripped off or locked down. Classically you park it in a DMZ, the screened subnet between your internal network and the wild, so it's reachable from outside without outside touching anything real.
Corn: One gate in the wall.
Herman: Right. And if you want a mental picture of why the pattern exists at all, think about a museum after hours. You don't hand every visitor a key to every gallery and trust them to lock up. You put one guard at one entrance, the guard checks everyone against one list, and the galleries themselves stay dark and sealed. The guard doesn't need to know anything about the exhibits — just who's allowed past the desk. That's the bastion. It's deliberately ignorant of what's behind it, because its only job is the doorway.
Corn: And the two structural benefits are real. A single point of entry shrinks your attack surface — one exposed box instead of forty. And one entry point gives you one aggregated audit log. Every connection through the wall passes the same desk, so you can actually read who came in.
Herman: And those two benefits compound. One exposed box means one thing to patch, one thing to watch, one thing to harden — and the audit log from that one box is the only log you need to read to know who touched your network. Forty scattered doors means forty logs nobody reads. That's how breaches go unnoticed for months.
Corn: And both of Daniel's implementations give him that. Tailscale hub-and-spoke, where the hub is a subnet router advertising routes into the tailnet. Or the classic: a hardened box in the DMZ, ProxyJump through it.
Herman: Right — and the Canopy framing matters here, because Canopy is exactly this pattern one level up. The agent holds one client connection, no credentials; the gateway dials out. Daniel's now asking the same question about the dial-outs themselves. Which plumbing gets the gateway to the scattered machines?
Corn: My bet before we start: the answer is both, in layers. But let's not skip ahead. Take the Tailscale hub apart.
Herman: The hub role is played by a subnet router. Any device on your local network that runs Tailscale and advertises the local subnet to your tailnet. Once that's in place, any device in the tailnet can reach every IP on that subnet. The printer, the NAS, the ancient box that can't run anything — they don't run Tailscale, they don't need to. The router vouches for the whole street.
Corn: So the hub isn't talking to the machines. It's talking to the network they're sitting in.
Herman: That's the elegant bit. Installing the client on every device gives you the best security — end-to-end encryption, peer to peer — but printers can't, and a fleet of a hundred servers won't. The subnet router says, fine, I'll carry you.
Corn: Hold on — how does that actually work in practice? If my phone is on mobile data in another country and the printer is at home, what's the path?
Herman: Good question, because the answer is the part people get wrong. The phone and the subnet router find each other through Tailscale's coordination servers, and then they try to establish a direct WireGuard connection — the NAT hole-punching magic. If the home router's NAT is cooperative, the phone talks straight to the subnet router over an encrypted tunnel, and the subnet router forwards the last hop onto the LAN in the clear. And that last hop is the thing to notice: the encryption is tailnet-to-router, not tailnet-to-printer. Inside the LAN, the packet is plain. Which for a home network is fine — the LAN is the trusted zone — but it's worth knowing where the armored section of the tunnel actually ends.
Corn: So the trust boundary moves to the router, not the printer.
Herman: The subnet router is now holding the trust of everything behind it, which is the same property a bastion has, and we'll come back to that symmetry.
Corn: And for Daniel's home-lab that's the whole trick. Canopy on the Android phone, tailnet in between, a subnet router at home advertising home-lab, and the agent reaches the NAS or the printer that couldn't spell WireGuard.
Herman: Setup-wise it's short. Install the client, turn on IP forwarding, then bring it up advertising the routes — you'd say advertise home-lab's subnet, something like one ninety-two dot one dot one slash twenty-four. Then the routes have to be approved in the admin console before anyone can use them. You can pre-approve in the policy file with autoApprovers, but here's the small trap: auto-approvers only apply when Tailscale first receives the advertisement. Updating the policy later doesn't retroactively bless routes that are sitting there unapproved.
Corn: The approval queue doesn't reread the rules it already rejected.
Herman: And the client side is asymmetric in a way that bites people: Linux clients need to explicitly accept routes, the accept-routes flag, while Windows, macOS, Android pick them up automatically once approved. So the one guy in the house running Linux is the one who can't reach the printer.
Corn: That guy is usually me.
Herman: I know. And then there's SNAT, which is on by default and hides something. Traffic from behind the subnet router appears to come from the router itself, not the original device. Fine for reachability, annoying if you want real source IPs in your logs.
Corn: Wait — why would the default be the dishonest one? That seems backwards.
Herman: Because of return routes. If the printer saw a packet from the tailnet's address space — the hundred-dot-sixty-four range — it would try to reply via its default gateway, which has no idea that range exists, and the reply dies at the edge. SNAT papers over that by making everything look local. It's the same reason a home router does NAT: it's not there to deceive you, it's there so nobody behind it needs new routing knowledge. The honesty costs you a static route on the LAN gateway.
Corn: So the default config trades honesty for convenience. Every packet arrives wearing the router's coat.
Herman: Nicely put... no, no, I'm not complimenting the coat. Moving on. The other half of the Tailscale approach is Tailscale SSH, and it's worth being precise, because people conflate it with plain SSH over Tailscale and they're different animals. Plain SSH over the mesh just uses the tailnet for reachability — you've still got normal keys, normal sshd config, everything. Tailscale SSH hands the whole thing over. Tailscale manages authentication and authorization. It takes over port twenty-two for tailnet traffic, authenticates over WireGuard with node keys, and here's the part that surprises people: your sshd config and your authorized_keys file are not modified. Connections from outside the tailnet still work the old way.
Corn: It doesn't move in. It puts a second door on the same wall.
Herman: And the keys — this is where I get excited, Corn — you stop managing keys. Node keys are auto-generated, they expire when the session ends, and access is decided by the policy file, which is deny-by-default. You want the agent to reach the VPS? Write a grant. You want it to stop? Delete the grant.
Corn: And what does a grant actually look like?
Herman: It's one line in the policy file. You say: this principal — the agent's node, or a tag it carries — can use SSH to this other node, as this user, for these actions. And because it's a text file in version control, your access rules suddenly have history. You can see who changed what, when, and revert it. Try doing that with a folder of authorized_keys files scattered across seven machines. The policy file is the first place SSH access control has ever been readable in my adult life.
Corn: And how fast does "stop" happen? Because this is the part I care about.
Herman: Seconds. You save the access control policy, and clients respond to the new rules within seconds — and this is the phrase that matters — it will stop existing SSH connections the user has established. Not future connections. The live one. The agent is mid-command on the box, you save the policy, the session dies.
Corn: That's the whole argument, isn't it. Everything else is plumbing.
Herman: Well, plumbing matters, but compare the work. With traditional keys, revoking someone means purging the key everywhere it landed — the workstation, the bastion's authorized_keys, every target's authorized_keys, and you have to find them first. Tailscale's own line on this is brutal: SSH doesn't force users to ever rotate keys, and in practice almost no one does.
Corn: Meanwhile the key that never got rotated is sitting in a file someone can copy.
Herman: A normal file, yes. Whereas the policy save kills the session in seconds and no key ever sat on disk to be copied. When the credential holder is an AI agent that never sleeps and never feels guilt, that gap is not a nice-to-have.
Corn: Corn's ideal machine does its work while nobody watches — I've said this before — but the flip side is that when you do need to watch, you need the off switch to reach the machine that's already running.
Herman: Was that a self-report?
Corn: No comment. Downsides. Give me the bill.
Herman: The bill has real line items. First, the coordination server. Tailscale is a control plane in the path of your access control — their servers, their availability, their account. If that offends you, Headscale exists for self-hosting, but now you're running the control plane, which is exactly the dependency the SSH approach doesn't have. Netmap caching softens the blast radius — it saves the network map to disk so nodes keep working when the coordination server is unreachable — but it's not available on Android or iOS.
Corn: Which is Daniel's phone.
Herman: Daniel's phone, yes. The single named client in his prompt is the one platform that can't cache. Second, platform limits: Tailscale SSH's server component is Linux only — macOS with the open-source tailscaled, if you're determined — version one twenty-four or later. You can connect from any platform, but the machines accepting connections had better be Linux. Third, if you wanted site-to-site, both subnet routers must be Linux, and overlapping subnets between sites need special handling — a 4via6 route or the HA trick. And the docs warn, in so many words, that running a subnet router on a mobile phone will significantly impact battery life.
Corn: Running your whole security model off the phone you also need to call people with.
Herman: There's one more, and I'd call it the quiet advantage: devices behind a subnet router don't count toward your pricing plan's device limit. The printer, the NAS, everything behind the router is free. At Daniel's scale that's pennies, but the pattern scales — a company with a thousand dumb devices cares a lot.
Hilbert: Hilbert's Lost Property. A beekeeper's hat, bees not included, found on the stairwell landing, now hanging over the coffee machine as a warning.
Hilbert: One brass tuba, found in the server room, I have taught it to sit and it does not.
Hilbert: A jar of preserved Tuesdays, found behind the fire door, labelled and left where it can think. Owners may collect from the anteater, on proof of an apology.
Corn: And the hub dying? If the subnet router falls over, every spoke behind it is unreachable.
Herman: They give you an answer for that, to be fair. Run two subnet routers advertising the same routes, and failover when one goes down takes about fifteen seconds. There's a beta called MagicRoute that ranks connectors from the client's point of view and picks the good one, but the basic answer is: second router, same routes, fifteen seconds of silence.
Corn: So the Tailscale hub is cheap to duplicate. Hold that thought, because it becomes the punchline later.
Herman: Agreed, it goes on the list. Before that — and now, as agreed — Hilbert's Lost Property.
Corn: The tuba has more discipline than our deployment pipeline.
Herman: Where were we — the bastion. The other implementation, the one that doesn't need anyone's control plane. And the funny thing is the modern client-side answer to it is three lines of config that replaced a bad old habit.
Corn: Agent forwarding.
Herman: The old pattern: you SSH to the bastion, forwarding your agent, then SSH onward using the forwarded agent — keys-based auth without copying keys around. And Oracle's documentation on this is as blunt as vendor documentation gets. It is, they say, not considered good security practice, because users with the appropriate privileges on the remote server — meaning anyone with root on the bastion — could hijack the agent and use it to connect to other systems without requiring authentication.
Corn: Root on the middle box borrows your identity while you're standing there.
Herman: Borrows it, uses it, gives it back, and you never know. And the reason the old habit persisted so long is that it felt safe — your key never left your laptop, technically. The key material stayed home; only the ability to use it traveled. But that ability is the whole crown. It's like leaving your house key at home but giving the burglar your hand to carry around.
Corn: ProxyJump fixed this, and the fix is structurally beautiful. The jump host doesn't see your key at all — it relays stdin and stdout straight through, and your key stays on your workstation. A compromised bastion can watch the traffic, and it cannot become you.
Herman: So the trust moved. With agent forwarding you trusted the middle box with your identity. With ProxyJump you trust it only to pass bytes.
Corn: Only bytes. And it needs no server-side configuration beyond ordinary SSH access to the bastion itself, which is why it spread so fast. The config is three lines: a Host block naming the jump host, a Host block for the destination, one line saying ProxyJump and the jump host's name. Then SSH destination just works. Ad hoc, it's the capital J flag on the command line, and you can even chain — jump one, jump two, destination — for the truly paranoid.
Herman: Two locks, one hallway. And the fun part of the history: ProxyJump only landed in OpenSSH in version seven point three, twenty sixteen. Before that, people were hand-writing the same thing as a ProxyCommand with netcat or socat plumbing the tunnel themselves — which worked, but was exactly the kind of incantation nobody could reproduce from memory at two in the morning. ProxyJump didn't add capability. It made the correct thing the easy thing, which is the only kind of security improvement that actually sticks.
Corn: Now, that's the client side. The bastion itself is where the real work is, because a bastion is a computer whose entire job is being attacked. And I mean that literally — stand up a public SSH server and the automated login attempts begin within minutes. There's a constant background hum of compromised machines scanning the internet for SSH with simple passwords. Passwords off, full stop — public key only, and a modern ed25519 key.
Corn: And when you say minutes — is that a figure of speech or a measurement?
Herman: A measurement. People have stood up honeypots with fresh IPs and logged the first connection attempt; the bots find the open port almost immediately, and from then on it's a steady drip of admin, root, test, ubuntu. It's not personal — it's not even directed at you. Your box just showed up in a scan of the whole internet. But that's the point: the bastion's threat model isn't a hacker who hates you. It's the weather.
Corn: And the box itself. What does a properly nervous sshd look like?
Herman: No root login. No password authentication. Public keys only. An allow-group so only the bastion group can even knock. Three auth tries, thirty-second login grace, and it logs you out if you go idle. No X11 forwarding, no agent forwarding, no tunnels — the middle box gets nothing but the relay job. And there's a meaner variant I like: for users who should only transit, no TTY at all, force a command that just refuses to give them a shell, and comment out the subsystem lines so there's no file transfer either. The box becomes a hallway with no rooms.
Corn: A door that only opens onto other doors.
Herman: Pure transit. And if you stop there, you've built the textbook bastion — and inherited the textbook list of problems, which is worth reading straight, because it's the same list Tailscale publishes. Management overhead. Susceptibility to attacks. Reliance on access keys. Single point of failure — if the bastion is down, nobody reaches anything, and one overloaded bastion chokes everyone at once. Latency, if your footprint is global: everything detours through one place, and throughput suffers with it.
Corn: They also make the point that the bastion becomes a pet. Hand-fed, patched by hand, mourned individually.
Herman: Pets as opposed to cattle in the DevOps model — yes. And the key hygiene problem is the one that never gets solved by discipline. Keys that never rotate, keys stored as ordinary files, and a revocation procedure that is, in practice, a scavenger hunt.
Corn: Now here's the thing I noticed in the Tailscale material, and I want you to check me on it. They list "single point of failure" as the bastion's flaw.
Herman: They do.
Corn: And their own subnet router — the hub of the hub-and-spoke — is exactly as central. If it dies, every device behind it is gone, same as a dead bastion. The difference isn't the architecture. It's that Tailscale hands you a cheap second copy and calls the problem solved, while the bastion gives you a second bastion and calls it added complexity.
Herman: That's fair, and it's the honest framing for Daniel: the single point of failure is a property of the pattern, not of either implementation. What differs is the price of the second one. Two subnet routers on the same routes is a rerun of the same install. Two bastions is two hardened, patched, watched machines — plus something to direct traffic between them, which is a third thing that can break. Tailscale's answer costs an afternoon; the bastion's answer costs an ongoing obligation.
Corn: The question Daniel should ask isn't "which one has a single point of failure." Neither, both — it's "how many minutes am I willing to be blind, and what does the fix cost me."
Herman: There's a subtler warning in the Tailscale docs that applies to bastions especially, and it's the perimeter trap. If the jumpbox is the only thing checking identity, then everything behind it is reachable by anyone who gets through. That's the traditional network perimeter model — one checkpoint, open countryside after it. Their line is you should be using the identity of the user instead of just the IP address of the user. The bastion that gets you onto the network shouldn't be the last word on what you may touch.
Corn: "You're on the property" is not "you're in the house."
Herman: The moment you notice that, you notice the answer to Daniel's either-or, because the two designs compose. The HuongCloud write-up says it in one line — you can combine them: a bastion reachable only via Tailscale. The bastion's worst property is that it's a public SSH port getting scanned within minutes of birth. Put the tailnet in front of it and the port stops being public. But the bastion's best property — one desk, one audit log, every connection written down — survives. You get the log without the exposure.
Herman: Corn — would you actually run that, or is it belt-and-braces you'd talk yourself out of?
Corn: I'd run it, and here's why. It answers the revocation question with two independent answers. Tailscale kills the session in seconds at the identity layer. The bastion, hardened to pure transit, is the second door that doesn't know your key even exists. For Canopy specifically: the tailnet handles who the agent is, the bastion handles where it may walk. Different layers failing for different reasons is the only redundancy I trust.
Herman: That's the composition I'd recommend, and for the setup order I'd do it simply. Tailscale first, on its own, because it delivers value in an afternoon — client installed, forwarding enabled, routes advertised, approved, Linux clients told to accept routes, then Tailscale SSH on the Linux targets with a policy grant. Then, if the audit log matters — and for an agent doing unattended work it should — add the bastion behind the tailnet: hardened sshd, ed25519 keys, ProxyJump entries, and lock down its egress so it can only reach the hosts it fronts.
Corn: One note before we get smug about SSH itself: the weak link in the whole chain, whichever plumbing you pick, is host key verification. If the host key isn't checked, there's no proof you're connecting to the server you expected — the agent could be shaking hands with an impostor and the prettiest network design in the world won't notice.
Herman: It's the step everyone skips, yes. The prompts you accept with a shrug on first connect are the signatures you never verify. And for an agent it's worse, because the agent will accept that prompt automatically — or worse, be configured to accept it always. On first connect you should verify the fingerprint out of band, then pin it. TOFU — trust on first use — is fine for humans who can remember being in the same room as the server. It's not fine for a process that would trust anything on day one and never revisit the decision.
Hilbert: Nine-six. Herman said the old modems, earlier, in the break — he said twenty-four hundred. It was nine-six. We paid for nine-six.
Herman: I'll take the correction, that's from your era and not mine.
Hilbert: Ninety-one. Nights at a freight depot in Slough. One dial-in line, one modem on a dedicated number, one box behind it — drivers ringing in for manifests after hours. That was the front door. No keys to speak of; you got on with the number and a password taped inside the supervisor's drawer, which I did not put there. I kept my own log, by hand, every dial-in, time, duration, on lined paper, because I did not trust the box to remember. Corn keeps a mental version of that and calls it opinions.
Corn: I stand by the lined paper.
Hilbert: Someone got in, spring of ninety-two, moved some manifest numbers, and the depot manager decided it was me, since I was the one who knew the number. My log showed the call came in on the Thursday I was in Luton. I was in Luton because the canteen woman, Mrs. Voss — her cat wasn't hers at nights, it was the depot's, and I'd agreed with her that I'd mind it weekends and she'd cover my heating... a private arrangement, the details are mine. Point being, I was forty minutes away and the paper proved it. Corn, you're popping on the last syllable again. So the question I've carried since then, and you two have finally said the words: with this ProxyJump, the middle box never sees the key. Does it still see the connections? The times, the duration — the lined paper?
Herman: Yes. That's the one thing the bastion keeps. It can't take your identity, but it logs your passing — which is exactly the evidence that cleared you. ProxyJump doesn't remove the record, it just removes the thing worth stealing.
Hilbert: Good. That settles it. I'd been told in ninety-two that logging in proved guilt, and I knew at the time it was the opposite. Corn's hit is riding low again. That's what I wanted.
Herman: What was the modem, incidentally — and do you still have the logbooks?
Hilbert: A Couriers rack unit, and the logbooks went in the skip with the desk, which I did not authorize. The habit stayed. I run a bastion off my hall table right now — plain OpenSSH, fronts the boiler controller, nothing else — and the modem is doing honest work as a doorstop. It was the right thing to trust: lined paper never lied to me, and neither did Mrs. Voss's cat. Good animal.
Corn: Corn, closing us out. The cutting-room floor first — one detail we didn't have room for. For anyone who goes the Tailscale route: the policy file has a tests section. You write assertions about who should reach what, and the file fails if a change breaks them. Your access rules get a test suite. Herman's the one who told me about it in the break and I've been waiting all episode to say it first.
Herman: You've been sitting on that for twenty minutes and it showed.
Corn: The open question I'd leave with Daniel: both designs put one box between the agent and everything, and only one of them admits it. Build the second copy before you need it. And notice what Tailscale itself is doing — agent provisioning went GA this month, their MCP controls in the summer. The commercial product is converging on Canopy's exact shape, which means the pattern is right and the competition is real. Which layer handles identity, which handles reachability — that's the whole decision, and it's a good one to make twice.
Herman: Thanks, as ever, to Hilbert Flumingtop, who produced this episode, corrected our modem history, and fixed Corn's levels mid-story.
Corn: If you want more of this, try episode twenty, Architectural AI; episode thirty-five, The Privacy Gap; and episode sixty-seven seventy-nine, Hosting an MCP Hub in the Cloud. This has been My Weird Prompts. If you enjoyed it, the archive lives at my weird prompts dot com — six thousand plus episodes of this, and the back catalogue is free.
Herman: We'll be back soon. Until then — rotate your keys, or better, stop having keys.
Corn: See you tomorrow.