Open in editor: allow configuring the advertised SSH host instead of <hostname>.local #10326
Replies: 2 comments
|
Adding a second case here per the close on #10906, plus a concrete option for the fix. Case: T3 server on an exe.dev VM (machine hostname Option: prefer the hostname the client paired through. The client already holds a name it has proven it can reach. Proposed precedence:
Keep an empty advertised list as "No SSH route" so a server without sshd is unchanged. Relay and T3 Connect targets have no direct URL and keep today's behavior. LAN IPs work as SSH hosts, so LAN pairings benefit too. Client-only change in Where it falls short: an HTTP-only tunnel hostname in front of the server (Cloudflare tunnel, ngrok) would be preferred and then fail on SSH. The Happy to send a PR for the paired-hostname change, or for the flag, whichever the maintainers prefer. |
|
I hit the same wall on a headless NixOS host where sshd sits on a non-default port and the tailnet name is not what clients have in their I will open a PR against |
Uh oh!
There was an error while loading. Please reload this page.
Problem
"Open in VS Code" from a browser/desktop client against a headless
t3 servehost only ever offers two SSH targets, computed server-side inRemoteOpenTargets(packages/server/.../remoteOpenTargets): the Tailscale MagicDNS name, else<os.hostname() first label>.local.On a LAN/VPN setup without Tailscale and without mDNS, the button produces
vscode://vscode-remote/ssh-remote+t3code.local/..., which no client can resolve:t3code.localnever answers on the LAN;t3code-ssh.example.com) that every client, on any machine, resolves through the internal DNS.Today the only workaround is a
Host t3code.localalias in~/.ssh/configon every client machine.Related but different: #7530 (same-machine LAN IP classified as remote), #8278 (Docker hop). Both are about whether the SSH path is taken; this one is about which host it advertises.
Proposal
Let the operator name the advertised SSH host, e.g. a
--remote-open-host <fqdn>flag ont3 serveor aT3CODE_REMOTE_OPEN_HOSTenv var (fits the existingT3CODE_HOSTpattern for the background service drop-in). When set, it becomes the firstRemoteOpenTarget(a new kind"configured", or reuse"tailscale"semantics of "reachable from anywhere"), ahead of the auto-detected tailnet/mDNS targets.Optionally also accept a
user@hostform so the deep link can carry the SSH user.Version:
t3@0.0.38, Linux host (Debian 13 LXC), background service.All reactions