C.W.K.
Stream
Lesson 12 of 12 · published

Real Fleet Config

~20 min · fleet, production-config, tailscale, lan, complete-example

Level 0Pinger
0 XP0/101 lessons0/12 achievements
0/150 XP to next level150 XP to go0% complete

A production-shaped ~/.ssh/config

Bringing it all together — a real config for a 9-machine home/office fleet, with LAN-direct access at home and Tailscale (Track 6) for anywhere-access. This is the shape your config should grow toward.

Anatomy of the structure

  1. Global defaults at the bottom — keys, agent/keychain, keepalive, ControlMaster.
  2. Workstations grouped — share the user, vary the HostName.
  3. Laptops grouped similarly.
  4. Tailscale aliases with ts- prefix, pointing to *.tail-net.ts.net (Track 6).

Code

Setup once·bash
mkdir -p ~/.ssh/sockets && chmod 700 ~/.ssh/sockets
A complete ~/.ssh/config·ssh-config
# ════════════════════════════════════════════════
# Office workstations (10GbE LAN)
# ════════════════════════════════════════════════
Host office
    HostName 192.168.1.10
    User you_username
Host server
    HostName 192.168.1.11
    User you_username
Host music
    HostName 192.168.1.12
    User you_username
Host worker
    HostName 192.168.1.13
    User you_username

# ════════════════════════════════════════════════
# Portables
# ════════════════════════════════════════════════
Host macbook
    HostName 192.168.1.20
    User you_username
Host pro2024
    HostName 192.168.1.21
    User you_username
Host pro2023
    HostName 192.168.1.22
    User you_username
Host mini
    HostName 192.168.1.30
    User you_username

# ════════════════════════════════════════════════
# Tailscale (anywhere)
# ════════════════════════════════════════════════
Host ts-*
    User you_username

Host ts-office
    HostName office.tail-net.ts.net
Host ts-server
    HostName server.tail-net.ts.net
Host ts-music
    HostName music.tail-net.ts.net

# ════════════════════════════════════════════════
# Global defaults — MUST be last
# ════════════════════════════════════════════════
Host *
    AddKeysToAgent yes
    UseKeychain yes
    IdentityFile ~/.ssh/id_ed25519
    IdentitiesOnly yes
    ServerAliveInterval 60
    ServerAliveCountMax 3
    ControlMaster auto
    ControlPath ~/.ssh/sockets/%r@%h-%p
    ControlPersist 10m

External links

Exercise

Audit your current ~/.ssh/config against this structure. Do you have: workstations grouped, laptops grouped, Tailscale (or remote) aliases prefixed, global defaults at the bottom, ControlMaster set up, IdentitiesOnly enabled? Add what's missing. Then commit your ~/.ssh/config to your dotfiles repo if you have one — this is the file that pays back every cwkPippa-style fleet for years.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.