Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d97267

Browse files
committed
cmd/tailscale/cli: disable 'tailscale ssh' on sandboxed macOS
Updates tailscale#3802 Updates tailscale#4518 Fixes tailscale#4628 Change-Id: I194d2cc30fc8e38b66d4910787efbce14317b0ff Signed-off-by: Brad Fitzpatrick <[email protected]>
1 parent 0df3b76 commit 0d97267

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/tailscale/cli/ssh.go

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"tailscale.com/envknob"
2323
"tailscale.com/ipn/ipnstate"
2424
"tailscale.com/net/tsaddr"
25+
"tailscale.com/version"
2526
)
2627

2728
var sshCmd = &ffcli.Command{
@@ -32,6 +33,9 @@ var sshCmd = &ffcli.Command{
3233
}
3334

3435
func runSSH(ctx context.Context, args []string) error {
36+
if runtime.GOOS == "darwin" && version.IsSandboxedMacOS() && !envknob.UseWIPCode() {
37+
return errors.New("The 'tailscale ssh' subcommand is not available on sandboxed macOS builds.\nUse the regular 'ssh' client instead.")
38+
}
3539
if len(args) == 0 {
3640
return errors.New("usage: ssh [user@]<host>")
3741
}

0 commit comments

Comments
 (0)