cmd/tailscale, etc: make "tailscale up --ssh" fail fast when unavailable

Fail on unsupported platforms (must be Linux or macOS tailscaled with
WIP env) or when disabled by admin (with TS_DISABLE_SSH_SERVER=1)

Updates #3802

Change-Id: I5ba191ed0d8ba4ddabe9b8fc1c6a0ead8754b286
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-04-18 09:37:23 -07:00
committed by Brad Fitzpatrick
parent f0e2272e04
commit 8f5e5bff1e
4 changed files with 89 additions and 1 deletions

View File

@@ -592,6 +592,10 @@ func runUp(ctx context.Context, args []string) error {
return err
}
} else {
if err := tailscale.CheckPrefs(ctx, prefs); err != nil {
return err
}
authKey, err := upArgs.getAuthKey()
if err != nil {
return err