Skip to content

cmd/tailcat, README.md: warn when a DNS-named SSH destination is wide open - #101

Merged
bradfitz merged 1 commit into
mainfrom
bradfitz/ssh-dns-probe
Sep 5, 2026
Merged

cmd/tailcat, README.md: warn when a DNS-named SSH destination is wide open#101
bradfitz merged 1 commit into
mainfrom
bradfitz/ssh-dns-probe

Conversation

@bradfitz

@bradfitz bradfitz commented Sep 5, 2026

Copy link
Copy Markdown
Member

A tailcat address published in a DNS TXT record is public, so the
server behind it must authenticate clients by something other than
possession of the address (--allow or --ssh-authorized-keys). People
were missing that connection and publishing no-auth-ssh servers in
DNS, handing a shell to anyone who reads the record.

Make the README say this explicitly in every section that touches
DNS TXT records or auth-free SSH, and make "tailcat ssh" catch the
misconfiguration: before connecting to a DNS-named destination, probe
the server the way a stranger would, with a freshly generated node
key and no SSH credentials, only the "none" auth method that the
no-auth-ssh service accepts. The probe authenticates only, with no
command or PTY request. If the server accepts the stranger, refuse
to connect and explain how to lock it down, unless the new
--skip-dns-safety-check flag is set (which also saves the probe's
round trips). Probe failures are not fatal: a --allow-protected
server ignores strangers entirely, so the probe just times out and
the real connection proceeds.

This can't catch someone who publishes an open server and never
connects to it, but the common path is to test your own server right
after setting it up, and the first such test now sounds the alarm.

Fixes #100

… open

A tailcat address published in a DNS TXT record is public, so the
server behind it must authenticate clients by something other than
possession of the address (--allow or --ssh-authorized-keys). People
were missing that connection and publishing no-auth-ssh servers in
DNS, handing a shell to anyone who reads the record.

Make the README say this explicitly in every section that touches
DNS TXT records or auth-free SSH, and make "tailcat ssh" catch the
misconfiguration: before connecting to a DNS-named destination, probe
the server the way a stranger would, with a freshly generated node
key and no SSH credentials, only the "none" auth method that the
no-auth-ssh service accepts. The probe authenticates only, with no
command or PTY request. If the server accepts the stranger, refuse
to connect and explain how to lock it down, unless the new
--skip-dns-safety-check flag is set (which also saves the probe's
round trips). Probe failures are not fatal: a --allow-protected
server ignores strangers entirely, so the probe just times out and
the real connection proceeds.

This can't catch someone who publishes an open server and never
connects to it, but the common path is to test your own server right
after setting it up, and the first such test now sounds the alarm.

Fixes #100

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I3f8b2c9a1d6e4075b8a2c4d9e6f1a3b5c7d9e0f2
@bradfitz
bradfitz merged commit 5a83b9f into main Sep 5, 2026
7 checks passed
@raggi

raggi commented Sep 5, 2026

Copy link
Copy Markdown
Member

People were missing that connection and publishing no-auth-ssh servers in
DNS, handing a shell to anyone who reads the record.

fwiw, I don't think we've seen anyone actually do this?

@bradfitz

bradfitz commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

fwiw, I don't think we've seen anyone actually do this?

Yeah, I guess the "could've potentially been" was too implicit there.

I think the intersection of:

  • people who use tailcat
  • people who use its SSH mode
  • people who don't understand that DNS TXT records are public
  • ... people who have a domain name
  • people who don't understand how tailcat works
  • people who then publish those tailcat addresses of their wide open SSH serverrs

... it zero.

Many of those factors alone are basically zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn when a tailcat address published in DNS points at an SSH server that accepts anyone

2 participants