Follow Discord
Sweep 24 Nov 2026 · 22:58Z Build v2.1.332 549 read Stable v2.1.325 Latest v2.1.331 Next v2.1.332 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-docs

SSH remote sessions in Claude Desktop on 3P changedthird-party/claude-desktop/ssh-remote-sessions

Nearest release: v2.1.332, published 5 hours after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 24 Nov 2026 17:04 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 24 Nov 2026 17:07 UTC.

Upstream edited
Recorded here
Lines+57added
Lines−3removed
From line 296 where the diff opens
First seen 28 Aug 2026 this site's first read of the page
Recorded edits47to this page, all time

### Refuse sessions on a host without a working sandbox #### What refuse does on a host #### Where sessions still run under refuse #### What refuse leaves out ### A required sandbox isn't available

The whole hunk

from line 296, old and new numbered
/
lines
from line 296
296296 
297297A device that gets its SSH keys from a managed profile, a registry policy, or the profile's bootstrap server moves to the configuration from the [Enterprise Admin Console](https://claude.com/docs/third-party/claude-desktop/admin-console.md) when its user signs in to an organization that uses the console and chooses that organization in the dialog that follows. The app then restarts. A device that used such an organization before its profile arrived, and whose user hasn't signed out of the app since, moves back at its first launch on Claude Desktop 2.37337.0 or later, with no new sign-in and without asking the user, even if the stored sign-in has expired. To prevent that, add `disableDeploymentModeChooser` to the profile before devices update. `forceLoginOrgUUID` prevents it only for organizations it leaves out. Before Claude Desktop 2.37337.0, a device with such a profile ignores the admin console.
298298 
299After the move, `sshHostAllowlist`, `sshConfigs`, `disableDesktopLocalSessions`, `sshTransport`, and `sshClientPath` from the profile, or from the profile's bootstrap server, don't apply, even where the console leaves them unset. For the profile's other settings, see [Which settings apply on a device with a managed profile](https://claude.com/docs/third-party/claude-desktop/admin-console.md#which-settings-apply-on-a-device-with-a-managed-profile).
299After the move, `sshHostAllowlist`, `sshConfigs`, `disableDesktopLocalSessions`, `sshTransport`, `sshClientPath`, and `sshHostSandboxUnavailable` from the profile, or from the profile's bootstrap server, don't apply, even where the console leaves them unset. For the profile's other settings, see [Which settings apply on a device with a managed profile](https://claude.com/docs/third-party/claude-desktop/admin-console.md#which-settings-apply-on-a-device-with-a-managed-profile).
300300 
301301* **Which hosts**: the console's `sshHostAllowlist` applies. If the console leaves the key unset (**Not set**), or the app hasn't yet downloaded the console's configuration at this launch (the copy a device keeps of the last download holds no lists), `sshHostAllowlist` from Claude Code's managed settings on the device applies. With neither, SSH remote sessions are off.
302302* **Which SSH client**: the console's `sshTransport` and `sshClientPath` apply. On a Windows device, a client that the console's `sshClientPath` names makes the connection only if it is Microsoft's OpenSSH. With `system-openssh`, SSH connections fail under any other client. A key that the console leaves unset takes its default under [Host requirements](#host-requirements). Until the app has downloaded the console's configuration at a launch, both keys count as unset, so no client is pinned. Until then the built-in client makes the connection on a Windows device, even where the console sets `system-openssh`. The device's OpenSSH client makes it on a macOS or Linux device, even where the console sets `builtin`.
from line 407
407407* `disabledBuiltinTools`, `builtinToolPolicy`, `autoModeEnabled`, and `disableBypassPermissionsMode`.
408408* [`allowedWorkspaceFolders`](https://claude.com/docs/third-party/claude-desktop/configuration#allowedworkspacefolders), evaluated against the host's filesystem. `~` is the SSH user's home on the host, `%VAR%` entries are ignored, and Claude Desktop refuses to start a session in a directory outside every entry, so with a fleet value such as `~/Documents/Claude`, remote sessions start only under that path in the SSH user's home. List the folders that users work in on the host rather than `~` or a folder that contains it, such as `/home`. The SSH user's home holds SSH keys and shell startup files, which Claude can read in a listed folder, and setting `mode` to `ro` on `~` doesn't keep Claude from changing them. For an entry with `mode` set to `ro`, see [Read-only folders on the remote host](#read-only-folders-on-the-remote-host).
409409* [`blockReadsOutsideWorkingDirectories`](https://claude.com/docs/third-party/claude-desktop/configuration#blockreadsoutsideworkingdirectories), evaluated on the host, so the working directories and the home directory it hides from shell commands are the SSH user's there. Hiding files from shell commands needs the host's sandbox dependencies (next item). On a host without those dependencies, or a Windows host, the key still confines Claude's file tools. For shell commands, the key can only ask the user to approve those that Claude Code recognizes as reading outside the working directories, or whose command lines it can't analyze. Files a user attaches to a remote session stay readable, except on a Windows host, where the session's plugin files and attachments stay outside the file tools' reach under this key.
410* `coworkEgressAllowedHosts`, as Claude Code managed settings. The network and filesystem sandbox it produces with `allowedWorkspaceFolders` depends on the host having Claude Code's sandbox dependencies installed (see [Claude Code sandboxing](https://code.claude.com/docs/en/sandboxing)). Without them, commands run unsandboxed. See [Sandbox status on the remote host](#sandbox-status-on-the-remote-host) for the message the session shows.
410* `coworkEgressAllowedHosts`, as Claude Code managed settings. The network and filesystem sandbox it produces with `allowedWorkspaceFolders` depends on the host having Claude Code's sandbox dependencies installed (see [Claude Code sandboxing](https://code.claude.com/docs/en/sandboxing)). Without them, commands run unsandboxed, unless you [refuse such sessions](#refuse-sessions-on-a-host-without-a-working-sandbox). See [Sandbox status on the remote host](#sandbox-status-on-the-remote-host) for the message the session shows.
411411* `managedMcpServers`, as the Claude Code managed setting that keeps the session from loading MCP servers that users define in Claude Code's own configuration on the host. The managed servers themselves are reached from the device (see [Where MCP servers run in a remote session](#where-mcp-servers-run-in-a-remote-session)).
412412* Plugins from your [allowed marketplaces](https://claude.com/docs/third-party/claude-desktop/extensions.md), copied to the host. A plugin's `hooks` directory is not copied, so its hooks do not run in a remote session, and a plugin whose manifest declares hooks elsewhere is not copied at all. To run your organization's hooks on the host, see [Run a hook for every user](https://claude.com/docs/third-party/claude-desktop/extensions.md#run-a-hook-for-every-user).
413413 
from line 439
439439* **Folders**: Claude Desktop doesn't compare the folders that the sandbox allows with the folders in your policy.
440440* **Network hosts**: if the answer lists the network hosts that the sandbox allows, and a network host from your policy is missing from the list, Claude Desktop reports the reason `overridden`. Claude Desktop doesn't check for network hosts that the remote host's own settings add. Requires Claude Desktop 3.6556.1 or later.
441441 
442When the sandbox isn't confirmed, the session continues and shell commands can run outside the sandbox. To keep Claude Code from starting on a host whose operating system has no sandbox or that lacks a dependency, set [`sandbox.failIfUnavailable`](https://code.claude.com/docs/en/sandboxing#enforce-sandboxing-with-managed-settings) to `true` and [`parentSettingsBehavior`](https://claude.com/docs/third-party/claude-desktop/code#interaction-with-claude-code%E2%80%99s-own-managed-settings) to `"merge"` in the host's Claude Code managed settings. With `"merge"`, that setting applies together with your policy.
442When the sandbox isn't confirmed, the session continues and shell commands can run outside the sandbox. To keep Claude Code from starting on a host whose operating system has no sandbox or that lacks a dependency, set [`sandbox.failIfUnavailable`](https://code.claude.com/docs/en/sandboxing#enforce-sandboxing-with-managed-settings) to `true` and [`parentSettingsBehavior`](https://claude.com/docs/third-party/claude-desktop/code#interaction-with-claude-code%E2%80%99s-own-managed-settings) to `"merge"` in the host's Claude Code managed settings. With `"merge"`, that setting applies together with your policy, where no server-managed or gateway settings apply. To require the sandbox from Claude Desktop's configuration, see [Refuse sessions on a host without a working sandbox](#refuse-sessions-on-a-host-without-a-working-sandbox).
443443 
444444Find the message, or the `reason` your collector received, for the cause and the fix.
445445 
from line 472
472472* **`sandbox_on`**: `false` when Claude Code reports no sandbox running, `true` when it reports one that Claude Desktop can't match to your policy, and absent when Claude Code doesn't say
473473* **`session_id`**: Claude Desktop's ID for the session
474474* **`backend_kind`**: `ssh`
475* **`refuse_set`**: `true` when Claude Desktop sent the [`refuse`](#refuse-sessions-on-a-host-without-a-working-sandbox) requirement with the session's start, and absent otherwise.
475476 
476477The event doesn't name the host. To find the host, ask the user that the [user attribution](https://claude.com/docs/third-party/claude-desktop/telemetry.md#user-attribution) attributes identify.
477478 
479### Refuse sessions on a host without a working sandbox
480 
481To stop Code sessions over SSH on a host where the [sandbox](https://claude.com/docs/third-party/claude-desktop/code.md#applied-as-managed-policy) from your policy can't start, set [`sshHostSandboxUnavailable`](https://claude.com/docs/third-party/claude-desktop/configuration#sshhostsandboxunavailable) to `refuse` in Claude Desktop's configuration. With the key unset or set to `warn`, such sessions run with a [warning](#sandbox-status-on-the-remote-host), and shell commands can run outside the sandbox.
482 
483Deliver the key as follows:
484 
485* **Versions**: update your devices first, and a Claude apps gateway that delivers your configuration, because an older gateway doesn't start with the key. Earlier versions of Claude Desktop run sessions as under `warn`, and on Windows and Linux a profile with the key [can turn off their other settings](https://claude.com/docs/third-party/claude-desktop/mdm.md#keys-that-an-earlier-version-does-not-recognize). The [configuration changelog](https://claude.com/docs/third-party/claude-desktop/configuration-changelog.md) gives the versions.
486* **Source**: where a bootstrap server or the Enterprise Admin Console delivers your configuration, set the key there, not in a device management profile, whose value Claude Desktop then drops. Elsewhere, add the key to a profile that holds your whole configuration, because a profile that sets it replaces the local configuration. A device's first profile [changes more than that](https://claude.com/docs/third-party/claude-desktop/mdm.md#what-a-profile-or-policy-changes-on-a-device). A device that gets the key from a profile, or from the profile's bootstrap server, can move to an Enterprise Admin Console organization, and that `refuse` then doesn't apply: see [Devices that move to an admin console organization](#devices-that-move-to-an-admin-console-organization).
487* **Value**: write `refuse` or `warn` in lower case. Any other value that isn't empty, such as `Warn`, counts as `refuse`.
488* **Restart**: expect Claude Desktop to ask users to restart it after the key changes, whether or not they use SSH.
489 
490#### What refuse does on a host
491 
492Claude Code on the host checks the sandbox each time it starts for a session, and exits if the sandbox isn't available. The session shows the card [A required sandbox isn't available](#a-required-sandbox-isn%E2%80%99t-available), and tries again when the user sends a message.
493 
494* **Linux hosts**: the check fails, for example, where a [sandbox dependency](https://code.claude.com/docs/en/sandboxing#set-up-linux-and-wsl2) is missing or AppArmor keeps bubblewrap from starting.
495* **Windows hosts**: Claude Code reports no sandbox there, so sessions don't start, apart from the [cases where sessions still run](#where-sessions-still-run-under-refuse).
496* **Sessions that are already running**: they continue until their next start. A resumed session, a scheduled run, and a side chat each count as a start.
497 
498#### Where sessions still run under refuse
499 
500Check your policy and your hosts for these cases:
501 
502* **Your configuration asks for no sandbox**: it asks for none where `coworkEgressAllowedHosts` contains `*` and `allowedWorkspaceFolders` is unset. On a device whose only configuration is the local configuration file, [an unset `coworkEgressAllowedHosts` doesn't turn on the sandbox by itself](https://claude.com/docs/third-party/claude-desktop/web-tools#unset-allowlist-in-code-sessions) either. Both keys reach well beyond SSH, so read the entries for [`coworkEgressAllowedHosts`](https://claude.com/docs/third-party/claude-desktop/configuration#coworkegressallowedhosts) and [`allowedWorkspaceFolders`](https://claude.com/docs/third-party/claude-desktop/configuration#allowedworkspacefolders) before you change them.
503* **Claude Code managed settings on the host replace your policy**: they do so unless `parentSettingsBehavior` there is `"merge"`, and settings from a policy helper do so either way. `refuse` then applies only if settings on the host turn a sandbox on. Where none do, a Windows host starts sessions too.
504* **Server-managed or gateway settings replace your policy**: with the [Claude API](https://claude.com/docs/third-party/claude-desktop/claude-api.md) as the inference provider, Claude Code on the host fetches the [server-managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) of the organization that owns the credential. If that organization has any, they replace your policy on every host, even one with no managed settings of its own, unless `parentSettingsBehavior` in them is `"merge"`. While they apply, Claude Code by default ignores most keys in a file or profile on the host, `"merge"` among them. A [Claude apps gateway's `code` settings](https://claude.com/docs/third-party/claude-desktop/code#interaction-with-claude-code%E2%80%99s-own-managed-settings) rank the same way, but merge unless they set `"first-wins"`.
505* **Managed settings loosen the sandbox**: even under `"merge"`, the values in the host's managed settings, the server-managed settings, or a gateway's `code` settings win over yours, for example `sandbox.enabled` or `sandbox.failIfUnavailable` set to `false`.
506* **A launcher on the host locates Claude Code itself**: with [`claudeCodeProcessWrapperEnabled`](https://claude.com/docs/third-party/claude-desktop/configuration#claudecodeprocesswrapperenabled) on, a session through such a launcher gets no sandbox settings from your policy, whatever `parentSettingsBehavior` says. A launcher that the host's managed settings name in `processWrapper` is different. `refuse` applies through it where those settings set `"merge"`, no server-managed or gateway settings apply, and the launcher passes its arguments on.
507* **The sandbox passes the check and fails later**: the session starts with no card, and each shell command that would run in the sandbox fails or is refused. Have the host's administrator repair the sandbox.
508 
509Where Claude Code's managed settings replace your policy, set `parentSettingsBehavior` to `"merge"` in them, as [Interaction with Claude Code's own managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) describes. `"merge"` counts for every application that starts Claude Code under those settings, Claude Desktop's local Code sessions included, and lets that application's allow rules and sandbox allowlists apply: see [Let an embedding host add policy](https://code.claude.com/docs/en/managed-settings#let-an-embedding-host-add-policy), which also says which source Claude Code reads the key from. If the same settings set `sandbox.failIfUnavailable` to `true`, the sessions for which your policy asks for a sandbox then [don't start on Windows](https://code.claude.com/docs/en/sandboxing#enforce-sandboxing-with-managed-settings), or on any machine where the sandbox can't start.
510 
511The rest is Claude Code's own policy, which binds every Claude Code that reads it, in a terminal too. To require a sandbox there, which is the only way behind a launcher that locates Claude Code, follow [Enforce sandboxing with managed settings](https://code.claude.com/docs/en/sandboxing#enforce-sandboxing-with-managed-settings) and [How Claude Code combines managed sources](https://code.claude.com/docs/en/managed-settings#how-claude-code-combines-managed-sources) in the Claude Code documentation. Settings that you create for this replace your policy too, unless they set `"merge"`.
512 
513Where a sandbox starts that didn't run before, a `true` for [`sandbox.autoAllowBashIfSandboxed`](https://code.claude.com/docs/en/settings-reference#sandbox-autoallowbashifsandboxed) in a user's, a project's, or a local settings file on the host takes effect: sandboxed Bash commands then run without a prompt, even past an ask rule for all of Bash.
514 
515To find sessions that started under `refuse` and run without a confirmed sandbox, look for `refuse_set` on the [`desktop_ssh_sandbox_check_failed`](#sandbox-status-on-the-remote-host) event. The attribute is absent for a session through a launcher that locates Claude Code, and for a process that started before you set the key. A sandbox that fails later and a refused start send no such event, so a missing event is no proof that the sandbox runs.
516 
517#### What refuse leaves out
518 
519Don't count on `refuse` to keep everything on the host inside the sandbox:
520 
521* **A refused host**: Claude Desktop still connects to it and installs Claude Code there, and MCP servers and `SessionStart` hooks can run before Claude Code exits.
522* **Excluded commands**: the sandbox doesn't cover commands listed in Claude Code's `sandbox.excludedCommands`. Under `refuse`, Claude Desktop shows the [`overridden`](#sandbox-status-on-the-remote-host) warning where Claude Code reports such commands, and the session continues.
523* **Other programs**: MCP servers on the host, hooks, `!` commands, and the session's terminal (including commands that Claude runs there) run outside the sandbox.
524* **The SSH account and repositories**: `refuse` doesn't protect against the SSH user, or against settings in that account or in a repository.
525 
478526### Sandbox from the host's managed settings
479527 
480528Where your policy has no sandbox, Claude Desktop 4.16336.0 or later asks Claude Code whether managed settings on the host turn a sandbox on, and reports one that isn't running.
from line 929
881929* **`the name is the jump host's`**: the card's title is "This computer's ssh refuses the jump host's user name". In the user's `~/.ssh/config`, move the name from `ProxyJump` to a `User` line in the jump host's own `Host` block.
882930 
883931This card requires Claude Desktop 2.37337.0 or later.
932 
933### A required sandbox isn't available
934 
935Claude Code on the host requires a sandbox that isn't available there, so it exits as it starts. The requirement comes from [`sshHostSandboxUnavailable`](#refuse-sessions-on-a-host-without-a-working-sandbox) set to `refuse` in your configuration, or from `sandbox.failIfUnavailable` in Claude Code settings on the host, in server-managed settings or a gateway's `code` settings, or in what a policy helper returns.
936 
937The card's details give Claude Code's reason, such as `dependencies are missing`. They can end with Claude Code's own hint, `Set sandbox.failIfUnavailable=false to allow unsandboxed execution`. Don't follow that hint: it switches the requirement off. Where the reason names missing dependencies on a Linux host, install the [sandbox dependencies](https://code.claude.com/docs/en/sandboxing#set-up-linux-and-wsl2) with the distribution's package manager, then have the user send a message in the session. Claude Code reports no sandbox on a Windows host, so use a macOS or Linux host.
884938 
885939### Setup on the host fails after SSH connects
886940 
Feedback