You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SSH Host aliases use raw OS hostnames: spaces split into multiple patterns and duplicates collide #32
Spaces:Host my macbook pro declares three separate patterns (my, macbook, pro), so ssh pro matches this node. Raw hostnames on macOS and Windows often contain spaces, apostrophes, or Unicode.
Duplicates: two peers with the same OS hostname (common for cloned VMs, localhost, or raspberrypi) produce two identical Host blocks. SSH uses the first match, so the second node can't be reached by name. Tailscale already de-duplicates these in MagicDNS (raspberrypi-1), but the server ignores that.
Non-SSH peers: Mullvad exit nodes, nodes shared in from other tailnets, and nodes tagged as services all get Host blocks. That adds noise and invites a mistaken ssh to a third-party machine.
Suggested approach
Use the first label of dnsName (unique within the tailnet and already DNS-safe) as the alias, and fall back to a sanitized hostname ([a-z0-9-] only).
Detect collisions and disambiguate them, or report them in the response.
Skip Mullvad and shared-in nodes by default, and add an includeShared/tags filter.
Optionally emit HostKeyAlias so key pinning survives IP changes.
Done when
Every generated Host line is a single SSH-safe token that is unique in the block. Tests cover spaces, duplicates, Unicode, and Mullvad/shared peers.
Activity
fix: ssh-config safety, macOS CLI resolution, share paths, test typec…