How to Hide Your Server's SSH Behind Tailscale and Shut Port 22
Security-conscious server administrators can eliminate public SSH exposure by routing connections through Tailscale, a WireGuard-based private mesh network that assigns each device a stable 100.x address invisible to the open internet. Once a server and a laptop share the same Tailscale network, SSH traffic flows over that private address, making a publicly open port 22 unnecessary. Users can choose between standard OpenSSH routed through Tailscale or Tailscale's own SSH daemon, which delegates authentication to Tailscale identity rules instead of OpenSSH. A critical precaution is disabling key expiry for the server in the Tailscale admin console, since the default 180-day timeout can permanently lock administrators out of a headless machine. UFW firewall rules should be updated to trust the Tailscale interface before the public SSH rule is removed, and the provider's browser console should be kept accessible as a recovery fallback.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in