Skip to main content
Self-Hosting & Privacy

Tailscale SSH: Retire Your Bastion Host

I retired my homelab's bastion host for Tailscale SSH: the ACL tag rules, the check-mode gotcha the docs underplay, and the real cost comparison.

Milan BuhaNovember 15, 20267 min read
ShareXin
Tailscale SSH: Retire Your Bastion Host

An old jump-host key was still sitting in a server's authorized_keys file, months after the laptop it belonged to was wiped. Finding it meant an evening spent auditing every box in the homelab for the same mistake. That's the night the bastion host got retired.

TL;DR — Tailscale SSH vs bastion host

  • Tailscale SSH authenticates connections with tailnet identity instead of distributed SSH keys — no authorized_keys files to audit, no key rotation when a device leaves.
  • It needs two rules in the tailnet policy file: an acls rule opening port 22, and an ssh rule naming who can log in as whom.
  • Check mode forces re-authentication, but defaults to a 12-hour window and cannot be used from a tagged device at all — both are gotchas the docs mention once and move past.
  • A bastion host costs money, is a single point of failure, and needs its own key hygiene. Tailscale SSH costs nothing extra on the free tier and removes the extra hop entirely.
  • Keep OpenSSH running until the tailnet path is verified — don't cut the fallback first.

What Tailscale SSH Actually Replaces

The old setup, like most small self-hosted fleets, used one jump box as the front door: laptop → bastion → internal server, with a key pair for the bastion and a second key pair (or the same one, badly) for everything behind it.

Tailscale SSH removes that distribution problem by authenticating the connection with the device's tailnet identity instead of a key file, as covered in the complete mesh VPN guide. If a device is already part of the tailnet — set up the way installing Tailscale on a homelab describes — it can be reached without a separate SSH key existing anywhere.

Note

Tailscale SSH doesn't touch /etc/ssh/sshd_config or ~/.ssh/authorized_keys on the target machine. Regular SSH connections that aren't routed over the tailnet keep working exactly as before, which is what makes it safe to roll out gradually.

Before/After: Retiring a Real Bastion Host

The old path to reach the Proxmox-hosted internal boxes was: SSH into the bastion from a laptop, then SSH again from the bastion to the actual target, using a second key stored on the bastion itself — a second copy of credentials sitting on a third machine, which is exactly the kind of sprawl that led to the stale-key audit in the first place.

After moving every box onto the tailnet and writing the ACL rules below, the same task is one hop: ssh admin@proxmox-host, authenticated by the laptop's own tailnet identity, with the bastion box decommissioned. No key to lose, no separate hop to audit, and one fewer machine that has to stay patched and online just to let anyone in.

Setting It Up: The Two ACL Rules You Need

Tailscale SSH needs two pieces in the tailnet policy file: an acls entry that allows the connection on port 22, and an ssh rule that says who may log in, to what, and as which local user:

{
  "acls": [
    { "action": "accept", "src": ["tag:admin"], "dst": ["tag:home-server:22"] }
  ],
  "ssh": [
    {
      "action": "accept",
      "src": ["tag:admin"],
      "dst": ["tag:home-server"],
      "users": ["root", "autogroup:nonroot"]
    }
  ]
}

tag:admin is applied to the laptop and phone that should have SSH access; tag:home-server is applied to the Proxmox host and the other internal boxes. Nothing outside those two tags can open an SSH session, regardless of what else the rest of the tailnet policy allows.

Paste this into the tailnet policy file from the admin console's Access Controls page — editing it requires an Owner, Admin, or Network Admin role on the tailnet; a regular member can view the policy but not save changes to it.

Tag Rules and Groups: Who Can SSH Into What

The same tag:home-server can carry a subnet route or exit-node advertisement at the same time, since tags are shared across every ACL use case — see Subnet Router vs Exit Node for how those two are configured independently. The ssh rule above only governs SSH itself; it doesn't grant or restrict anything else the tag is used for.

Tags matter more here than they do for ordinary tailnet access, because Tailscale's own SSH documentation sets a hard constraint: an SSH access rule from a tagged device can only reach another tagged device — never a device owned by a regular user — and a tagged source can never use check mode at all. Copy an ACL example from the docs that assumes a personal, non-tagged source, and apply it to a server-to-server tagged connection, and it silently fails that constraint instead of connecting.

Warning

if the plan is to SSH between two servers (not just from a personal laptop into a server), both ends need a tag — a tagged device cannot SSH into a device that only belongs to a user account.

The Check-Mode Gotcha Nobody Warns You About

Check mode adds a prompt that forces re-authentication before a connection is trusted, which is the obvious thing to turn on for anything sensitive. What's easy to miss is the detail buried in Tailscale's SSH documentation: a check-mode rule defaults to a 12-hour checkPeriod before re-authentication is required again, and that period can be set anywhere from one minute up to 168 hours (one week), or to always to force a check on every single connection.

The near-lockout moment came from assuming the default 12-hour window would just quietly renew itself in the background. It doesn't — once the window closes, the next connection attempt is the one that prompts again, not the session that's already open. A long-running session isn't killed mid-stream, but anything new after the window lapses stalls on a prompt the automation calling it was never built to answer.

Tip

if anything unattended (a cron job, Ansible, a monitoring script) connects over Tailscale SSH, either keep that source off check mode entirely or set a checkPeriod long enough that the automation's own schedule never crosses it — Tailscale's documentation explicitly flags always as likely to break tools like Ansible that open many short-lived connections.

168hthe longest checkPeriod Tailscale SSH allows before forcing re-authentication — tunable all the way down to one minute, per Tailscale's SSH documentation

Cost and Complexity: Bastion Host vs Tailscale SSH

Bastion host Tailscale SSH
Extra infrastructure One more always-on box or VPS, patched and monitored like any other server None — rides the tailnet every device already joined
Key management A key pair per user, copied to the bastion and often again to internal hosts None — authentication is the device's tailnet identity
Single point of failure Yes — if the bastion is down or compromised, so is every path behind it No single extra hop; each device is reached directly
Cost Whatever the box or VPS costs to run No added cost on Tailscale's free personal tier, which covers a homelab-sized device count
What you maintain instead The bastion's OS, its SSH daemon, its own key rotation The tailnet ACL policy file

A bastion host needs patching and its own security hardening as a standing service; Tailscale SSH trades that for getting the ACL tag rules right once. For a homelab, as also covered in protecting SSH servers with Tailscale, that second workload is smaller and doesn't grow with the number of boxes behind it.

Migration Checklist: Don't Lock Yourself Out

  1. Join every box to the tailnet first — see installing Tailscale on a homelab — before touching any ACL rules.
  2. Write the ssh tag rule above and test a connection from a second terminal session while the first one stays open, so there's a live fallback if the rule is wrong.
  3. Leave the existing OpenSSH daemon and key-based login enabled until the Tailscale SSH path is confirmed working end to end — don't disable password or key auth on day one. (This and the sshd_config/authorized_keys behavior above are Linux specifics; Windows and macOS targets keep their own native SSH/RDP fallback during the same migration.)
  4. Only decommission the bastion host, and only remove the old SSH keys, once every device that needs access has connected successfully over the tailnet at least once.
  5. If using check mode anywhere automation touches, set checkPeriod deliberately — don't leave it on the 12-hour default without checking what else connects on a schedule.

FAQ

Does Tailscale SSH replace the need for SSH keys entirely?

For connections made over the tailnet, yes — authentication uses the device's tailnet identity instead of a distributed key pair. Regular SSH access outside the tailnet, through sshd_config and authorized_keys, is untouched and keeps working unless it's separately disabled.

What is check mode in Tailscale SSH and when should I use it?

Check mode forces re-authentication before a connection is trusted, with a default re-prompt window (checkPeriod) of 12 hours, configurable from one minute to 168 hours or set to always. Use it for high-risk destinations like root access; avoid it for unattended automation that opens frequent short-lived connections, per Tailscale's own documentation.

Can Tailscale SSH lock me out of my own server?

Not if OpenSSH and the existing key-based fallback stay enabled during migration. The real risk is writing an ACL rule that's too narrow and testing it in the same terminal session it might cut off — always verify a new rule from a second, already-open session first.

Is Tailscale SSH free for personal or homelab use?

Tailscale SSH is included at no extra cost on Tailscale's free personal tier, which covers typical homelab device counts without a paid plan.

Related stories

More from Self-Hosting & Privacy

Stay in the loop

Get the latest articles delivered to your inbox. No spam, unsubscribe anytime.

Read next

Tailscale Subnet Router vs Exit Node

Subnet routers let you reach a home device that can't run Tailscale; exit nodes route all your traffic through home instead. Here's the decision table, the exact commands for both, and the Linux-only gotcha that leaves an approved route unreachable.

Continue Reading