from line 723
723723* The server doesn't need to allow TCP, Unix socket, agent, or X11 forwarding. A `ProxyJump` host must allow TCP forwarding to the SSH port of the session's host.
724724* A POSIX shell, or PowerShell on Windows.
725725* `git` on the path, for git features.
726* A home directory that the SSH user can write to and run programs from, with about 1 GB of disk space for the three Claude Code versions the app keeps and a fourth while an update installs. A home directory mounted `noexec` doesn't work.
726* A home directory that the SSH user can write to and run programs from, with about 1 GB of disk space for the three Claude Code versions the app keeps and a fourth while an update installs. A home directory mounted `noexec` doesn't work. Where [`sshHostProgramsPreinstalled`](#preinstall-the-remote-server-and-claude-code-on-ssh-hosts) is on, the home directory must still be writable, but Claude Desktop puts neither the remote server nor Claude Code there.
727727
728728The device needs the OpenSSH client (`ssh` and `ssh-keygen`). Claude Desktop runs the first `ssh` on the user's `PATH`. On macOS and Linux, while `sshClientPath` is unset, Claude Desktop can also run `/usr/bin/ssh`. On Windows, the first `ssh` is the first `ssh.exe`, and a `.bat`, `.cmd`, or `.ps1` wrapper named `ssh` isn't run. For the `ssh` that carries the connection on a Windows device, see [Prepare Windows devices for the OpenSSH client](#prepare-windows-devices-for-the-openssh-client).
729729
from line 985
985985* **Moved or mounted profiles**: Claude Desktop looks in `AppData\Local` under the user's profile folder, even where the `LOCALAPPDATA` variable points elsewhere. It refuses a profile folder that is a UNC path, such as `\\server\profiles\user`. Where Windows mounts the profile from a profile container, test one device before you deliver the value to the others.
986986* **A changed or removed value**: a running Claude Desktop can keep using the client after you change or remove the value. Have users quit and reopen Claude Desktop.
987987
988## Preinstall the remote server and Claude Code on SSH hosts
989
990By default, Claude Desktop puts the [remote server](#how-a-remote-session-works) and Claude Code in each SSH user's home directory on the host and runs them from there. With `sshHostProgramsPreinstalled` (beta) set to `true`, Claude Desktop runs both programs from `/usr/libexec/claude-desktop-ssh`, a folder on the host that root owns and you fill, and uploads neither program. The key requires Claude Desktop 6.6395.0 or later. On a Mac, use 6.6395.1 or later.
991
992Turn the key on where hosts don't run programs from home directories, for example under a `noexec` mount or an application allowlist, or where your policy has root install the programs that run on a host.
993
994Plan for these effects before you turn the key on:
995
996* **Hosts that Claude Desktop refuses**: Claude Desktop refuses hosts that aren't Linux, and Linux hosts that lack the versions of the remote server and Claude Code that Claude Desktop needs. It doesn't upload the programs instead. A remote server that already runs on such a host keeps running, with the work under it, and a device with the key on can't connect to it. You can end it on the host.
997* **Exact versions**: each Claude Desktop release needs one version of the remote server and one version of Claude Code. A device that updates before you install those versions can't connect to your hosts, or reach work that already runs on them, so [hold updates until the hosts are ready](#install-new-versions-before-devices-update). Claude Desktop starts Claude Code with its background updates turned off.
998* **Running work**: the first time a device with the key on connects to a host that has both versions, Claude Desktop ends the remote server that it started from the home directory, and the work that runs under that remote server. A turn in progress is cut off, and users can resume the conversation afterward. A running Claude Desktop can apply the key without a restart. Deliver the change when no work runs on the hosts, overnight runs included, and tell users first. Turning the key off interrupts that work too.
999* **What stays in the home directory**: the home directory must still be writable. The remote server keeps its [socket, token, and log](#host-requirements) there, and Claude Desktop still puts synced plugins, their programs included, and uploaded files there. A `noexec` mount or an allowlist can stop the plugins' programs from running. The key doesn't restrict other code that runs under the SSH user's account, so it isn't a security boundary against that account.
1000* **Earlier copies in home directories**: Claude Desktop doesn't remove the copies of both programs that it put in `~/.claude/remote/srv/` and `~/.claude/remote/ccd-cli/` before the key came on. If your policy wants them gone, have each SSH user remove their own copies. Don't delete them as root. Wait until every device whose users connect to the host has the key on and none of their work still runs from the copies.
1001
1002### Install the remote server and Claude Code on a host
1003
10041. **Find the two versions.** Under each release, the [Claude Desktop release notes](https://claude.com/docs/cowork/changelog.md) give the `Bundled Claude Code version` and the `SSH helper version`, which is the remote server's version.
1005
10062. **Download both programs.** Run these commands in a terminal, in an empty folder, on a Linux machine that has `curl`, `gpg`, `zstd`, and `jq` and can reach `downloads.claude.ai`. The hosts don't need to reach that address. Replace the two placeholders with the versions for the Claude Desktop release that your devices will run. To choose the builds, run `uname -m` and `ldd --version` on a host.
1007
1008 ```bash theme={null}
1009 HELPER="<SSH helper version>"
1010 HELPER_BUILD=linux-amd64 # linux-arm64 where uname -m prints aarch64; glibc and musl hosts take the same build
1011 CODE="<Claude Code version>"
1012 CODE_BUILD=linux-x64 # linux-arm64 on aarch64; linux-x64-musl or linux-arm64-musl where ldd --version names musl
1013 curl -fsSL -o helper-manifest.json "https://downloads.claude.ai/claude-ssh-releases/$HELPER/manifest.json"
1014 curl -fsSL -o claude-ssh.zst "https://downloads.claude.ai/claude-ssh-releases/$HELPER/$HELPER_BUILD/claude-ssh.zst"
1015 zstd -d claude-ssh.zst -o server
1016 curl -fsSLO "https://downloads.claude.ai/claude-code-releases/$CODE/manifest.json"
1017 curl -fsSLO "https://downloads.claude.ai/claude-code-releases/$CODE/manifest.json.sig"
1018 curl -fsSL -o claude "https://downloads.claude.ai/claude-code-releases/$CODE/$CODE_BUILD/claude"
1019 ```
1020
10213. **Check the downloads.** Check Anthropic's signature on Claude Code's `manifest.json` as [Verify the manifest signature](https://code.claude.com/docs/en/setup#verify-the-manifest-signature) describes. Then compare all three files with the manifests, in the same folder:
1022
1023 ```bash theme={null}
1024 jq -r --arg b "$HELPER_BUILD" '.platforms[$b] | "\(.checksum) claude-ssh.zst\n\(.binarySha256) server"' helper-manifest.json | sha256sum -c
1025 jq -r --arg b "$CODE_BUILD" '.platforms[$b] | "\(.checksum) claude"' manifest.json | sha256sum -c
1026 sha256sum server claude
1027 ```
1028
1029 The commands print `claude-ssh.zst: OK`, `server: OK`, and `claude: OK`, then the checksums of `server` and `claude`. Keep those two checksums for the check on each host. The remote server's manifest isn't signed, so its checksums show only that your copies match what `downloads.claude.ai` served.
1030
10314. **Install the files.** Copy `server` and `claude` to a folder on the host that only root can write. In that folder, with `HELPER` and `CODE` set to the same two versions, run these commands as root in a terminal on the host. A command stops with an error if you haven't set its variable:
1032
1033 ```bash theme={null}
1034 P=/usr/libexec/claude-desktop-ssh
1035 install -d -m 0755 -o root -g root "$P" "$P/srv" "$P/srv/${HELPER:?}" "$P/ccd-cli"
1036 install -m 0755 -o root -g root server "$P/srv/${HELPER:?}/server"
1037 install -m 0755 -o root -g root claude "$P/ccd-cli/${CODE:?}"
1038 ```
1039
1040 Where an application allowlist runs on the host, add both installed files to it.
1041
10425. **Check the result.** Sign in to the host as one of your SSH users, start `sh`, set `HELPER` and `CODE` again, and run these commands:
1043
1044 ```bash theme={null}
1045 P=/usr/libexec/claude-desktop-ssh
1046 stat -c '%U:%G %a %n' / /usr /usr/libexec "$P" "$P/srv" "$P/srv/${HELPER:?}" "$P/srv/${HELPER:?}/server" "$P/ccd-cli" "$P/ccd-cli/${CODE:?}"
1047 sha256sum "$P/srv/${HELPER:?}/server" "$P/ccd-cli/${CODE:?}"
1048 ```
1049
1050 Every `stat` line starts with `root:root` and shows mode `755` or `555`. A stricter mode on `/`, `/usr`, or `/usr/libexec` is fine as long as SSH users can enter the folder. The two checksums equal the ones that you kept. If a line differs, run neither file. [Correct the file or folder](#correct-a-wrong-file-or-folder) first, and then start this step again.
1051
1052 Once every line is as described, run both programs in the same terminal:
1053
1054 ```bash theme={null}
1055 "${P:?}/srv/${HELPER:?}/server" --version
1056 "${P:?}/ccd-cli/${CODE:?}" --version
1057 ```
1058
1059 The two commands print the same versions as the folder and file names, in the form `claude-ssh <version> (built <time>)` and `<version> (Claude Code)`.
1060
1061The folder must meet the following conditions. Otherwise, users can get the card [Ask your admin to check Claude's installation](#ask-your-admin-to-check-claude%E2%80%99s-installation). Claude Desktop doesn't find every fault, so check the folder yourself.
1062
1063* **Owner and mode**: root owns both files and every parent folder, and no group or other account can write to any of them. SSH users can enter the folders, and can read and run both files.
1064* **Kind of file**: both are regular files with no setuid bit, setgid bit, or file capabilities. Neither the folder nor anything inside it is a symbolic link.
1065* **Name**: the remote server sits in a folder named for its version, and the Claude Code file is named for its version. Versions for several releases can sit side by side.
1066* **File system**: the folder is on the machine's own disk or in the container's image, not on a network share. Where SSH logins start in a container, install the files in that container's image, and test one such host with a pilot device first.
1067
1068Keep both files exactly as you downloaded them, and turn off any packaging step that strips or rewrites programs.
1069
1070Keep `/bin/sh` on every host, keep `stat` and `readlink` in `/usr/bin` or `/bin`, and let SSH users run all three. If `stat` in `/usr/bin` or `/bin` rejects the `-c` option, replace it, for example with the one in GNU coreutils.
1071
1072#### Correct a wrong file or folder
1073
1074To correct a wrong owner or mode, or a file whose checksum differs, work as root in a terminal on the host:
1075
1076* **A file**: delete the file and install it again as **Install the files** describes. After `chown` or `chmod` alone, another account that opened the file for writing while the owner or mode was wrong can still change the file's contents.
1077* **`/usr/libexec/claude-desktop-ssh` or a folder inside it**: note the versions that the folder holds, delete the folder, and install each of those versions again.
1078* **A folder above `/usr/libexec/claude-desktop-ssh`**: if root doesn't own the folder, or another account can write to it, treat the host as compromised.
1079
1080After you replace a file or folder, repeat **Check the result**. Then list what still runs from the folder, with the command under [Install new versions before devices update](#install-new-versions-before-devices-update). A line that ends in `(deleted)` names a program that started from a file that you replaced. As root in a terminal on the host, end each program whose line ends in `(deleted)`, for example with `kill`, which also ends the work that runs under that program. Leave the other programs running.
1081
1082### Turn on sshHostProgramsPreinstalled
1083
1084Start with one pilot device whose user connects to hosts that you have prepared for that device's version of Claude Desktop. Set `sshHostProgramsPreinstalled` to `true` in the device's [managed location](https://claude.com/docs/third-party/claude-desktop/mdm.md#4-deploy-the-configuration). Claude Desktop takes this key from device management and ignores it in the local configuration, a [bootstrap server](https://claude.com/docs/third-party/claude-desktop/bootstrap.md)'s response, and the Enterprise Admin Console.
1085
1086* **Versions on the device**: deliver the key to devices on Claude Desktop 6.6395.0 or later (on a Mac, 6.6395.1 or later), and [hold their updates](#install-new-versions-before-devices-update) first. A version that doesn't recognize the key [can turn off other settings](https://claude.com/docs/third-party/claude-desktop/mdm.md#keys-that-an-earlier-version-does-not-recognize).
1087* **Where to put the key**: put it in the machine-level profile or policy, together with your other Claude Desktop keys. On Windows, a value in machine policy (`HKLM`) makes Claude Desktop [ignore user policy](https://claude.com/docs/third-party/claude-desktop/mdm.md#4-deploy-the-configuration) (`HKCU`) entirely, so move keys that you keep in user policy to machine policy first. On a Mac, put every key in one machine profile, as the same section describes. A profile or policy that sets only this key leaves the device's local configuration in force, and still [changes other behaviors on the device](https://claude.com/docs/third-party/claude-desktop/mdm.md#what-a-profile-or-policy-changes-on-a-device).
1088* **Hosts with a corporate launcher**: where the host's Claude Code managed settings name a [launcher](https://claude.com/docs/third-party/claude-desktop/code.md#start-code-sessions-through-a-corporate-launcher) in `processWrapper`, Claude Desktop gives that launcher the path of Claude Code in the folder, so the host needs both programs. Set `claudeCodeProcessWrapperEnabled` to `true` in the same profile or policy as this key, and also where a bootstrap server or the Enterprise Admin Console serves your configuration. Otherwise, new sessions can [start without the launcher](https://claude.com/docs/third-party/claude-desktop/code.md#devices-that-skip-the-corporate-launcher).
1089* **Linux devices with an exported file**: the in-app configuration window has no field for this key. Where `/etc/claude-desktop/managed-settings.json` is that window's [JSON export](https://claude.com/docs/third-party/claude-desktop/configuration-format.md#the-linux-configuration-file), which has a `$schemaVersion` key, add each key yourself at its nested place, inside the object of that name if the file already has one: `codeSurface.sshHostProgramsPreinstalled`, `autoUpdate.disabled` for `disableAutoUpdates`, and, for hosts with a launcher, `workspace.claudeCodeProcessWrapperEnabled`. A key at the top level of an export makes Claude Desktop ignore every setting in the export's nested form, the connection included.
1090* **The value on Windows**: write a `REG_DWORD` of `1`. Claude Desktop [doesn't see some other value types](https://claude.com/docs/third-party/claude-desktop/mdm.md#4-deploy-the-configuration), and then leaves the key off without a warning.
1091* **A policy that Claude Desktop can't read**: where Claude Desktop can't read the device's policy, it can upload both programs to home directories as it does without the key. Look for `two programs preinstalled on SSH hosts` in `ssh.log` on each device, not only on the pilot device.
1092
1093To apply the key at once, have the pilot user quit and reopen Claude Desktop. After the user connects to a host, search `ssh.log` in the [logs directory](https://claude.com/docs/third-party/claude-desktop/data-storage.md#where-data-lives) on the device for `two programs preinstalled on SSH hosts`. Claude Desktop writes that line when it connects with the key on.
1094
1095To go back, set the key to `false` and have users quit and reopen Claude Desktop. Claude Desktop then puts both programs in home directories again, so it can't use hosts that don't run programs from there. If you held updates only for this key, release them.
1096
1097### Install new versions before devices update
1098
1099A release's notes come out together with the release, so you can't install its programs ahead of time. Hold updates on your devices instead:
1100
11011. **Hold updates.** Set [`disableAutoUpdates`](https://claude.com/docs/third-party/claude-desktop/configuration#disableautoupdates) to `true` and distribute new releases of Claude Desktop yourself, as [Updates](https://claude.com/docs/third-party/claude-desktop/installation.md#updates) describes. Claude Desktop then fetches no updates, security fixes included, until you distribute them.
1102 * **Other app-behavior keys**: `disableAutoUpdates` is an [app-behavior key](https://claude.com/docs/third-party/claude-desktop/mdm.md#update-keys-and-managed-precedence), so put every other app-behavior key that your devices use, such as a proxy key or `claudeCodeProcessWrapperEnabled`, in the same profile or policy.
1103 * **A bootstrap server or the Enterprise Admin Console**: where one also serves your configuration, set `disableAutoUpdates` there too.
1104 * **An update that is already downloaded**: an update that a device downloaded before the hold can still install when Claude Desktop next restarts. Have each user restart Claude Desktop once after the hold arrives, and prepare the hosts for the version that it then runs.
1105 * **Updates from outside Claude Desktop**: on Linux devices, apt installs new versions whatever the value of `disableAutoUpdates`, so also [keep those devices on the versions you distribute](https://claude.com/docs/third-party/claude-desktop/telemetry.md#auto-updates). The Microsoft Store package updates through the Store, so hold its updates there.
11062. **Read the new release's notes** for its two versions. A release can keep one or both versions of the release before it.
11073. **Install the new versions on every host**, beside the old ones, and check them as [Install the remote server and Claude Code on a host](#install-the-remote-server-and-claude-code-on-a-host) describes.
11084. **Test with pilot devices.** Update one pilot device of each operating system that your users run, and have each pilot user start a session on one host of each kind that you maintain, for example each Linux distribution or container image. If a pilot user gets an error card, follow the card's entry under [Troubleshoot](#troubleshoot) before you go on.
11095. **Update the other devices.**
1110
1111Keep the old versions on a host until every device has updated and nothing runs from the old files. To list what still runs from the folder, run `ls -l /proc/[0-9]*/exe 2>/dev/null | grep /usr/libexec/claude-desktop-ssh/` as root in a terminal on the host. Each line that it prints names a file that is still running.
1112
9881113## Troubleshoot
9891114
9901115### Your organization doesn't allow this SSH connection
from line 1145
10201145A launcher started this session, or the session that it was made from, and now the host names no launcher or `claudeCodeProcessWrapperEnabled` is off. Claude Desktop shows this card only if a new session can use [the host's own AWS profile](#amazon-bedrock-with-a-named-profile). The user can select **New session**, and the new session signs in with the host's own AWS profile, if the host has one. To continue the old session, name the launcher on the host again and turn `claudeCodeProcessWrapperEnabled` on.
10211146
10221147This card requires Claude Desktop 7.37095.0 or later.
1148
1149### Ask your admin to set up Claude
1150
1151The card's title is `Ask your admin to set up Claude on <host>`, and the card says `This host doesn’t have the version of Claude this app needs.` The device has [`sshHostProgramsPreinstalled`](#preinstall-the-remote-server-and-claude-code-on-ssh-hosts) on, and Claude Desktop, signed in as the SSH user, finds no file at one of the two paths that its version needs. Ask the user for `ssh.log` from the [logs directory](https://claude.com/docs/third-party/claude-desktop/data-storage.md#where-data-lives) on the device, which names each missing file. [Install those versions on the host](#install-the-remote-server-and-claude-code-on-a-host), and check that the SSH user can enter every parent folder.
1152
1153### Ask your admin to check Claude's installation
1154
1155The card's title is `Ask your admin to check Claude’s installation on <host>`, and the card says `Claude is installed on this host but didn’t pass its startup check.` The device has [`sshHostProgramsPreinstalled`](#preinstall-the-remote-server-and-claude-code-on-ssh-hosts) on and the files are on the host. Causes include the following:
1156
1157* **The conditions for the folder**: a file or a parent folder doesn't meet the conditions that [Install the remote server and Claude Code on a host](#install-the-remote-server-and-claude-code-on-a-host) describes.
1158* **A program that the host doesn't run**: the SSH user can't run the file, the build is for another processor or C library, or an application allowlist on the host doesn't trust the new file yet.
1159* **A Claude Code file named for another version**: Claude Code reports a version that differs from its file's name.
1160
1161As the SSH user, run the commands under **Check the result** in [Install the remote server and Claude Code on a host](#install-the-remote-server-and-claude-code-on-a-host). `ssh.log` in the [logs directory](https://claude.com/docs/third-party/claude-desktop/data-storage.md#where-data-lives) on the device gives the path and the reason.
1162
1163### Connect to a Linux host that your organization has set up
1164
1165The card's title is `Connect to a Linux host that your organization has set up`, and the card says `Your organization allows SSH sessions only on Linux hosts it has set up for Claude.` The device has [`sshHostProgramsPreinstalled`](#preinstall-the-remote-server-and-claude-code-on-ssh-hosts) on, and the host isn't Linux, or the SSH user's login shell on a Linux host is PowerShell. Have the user connect to a Linux host that you prepared, or give the account another login shell.
10231166
10241167### SSH host key verification failed
10251168
No line in this hunk matches that.