# Claude Code with VS Code Remote-SSH, WSL and containers

> In a VS Code Remote-SSH, WSL or dev container window, the Claude Code extension runs remotely: sign-in, ~/.claude, MCP servers and the CLI live there.

Source: https://shuriken.sh/guides/claude-code-vscode-remote-ssh

In a VS Code Remote-SSH, WSL or dev container window, the Claude Code extension installs and runs on the remote machine, not on your laptop. Its sign-in, its ~/.claude settings, its MCP servers and the claude CLI all live there, so you install, sign in and configure it on that side.

By Shuriken Updated 27 October 2026 8 min read

**Contents**

In a VS Code Remote-SSH, WSL or dev container window, the Claude Code extension installs and runs on the remote machine, not on your laptop. Its sign-in, its ~/.claude settings, its MCP servers and the claude CLI all live there. So you install the extension in the remote window, sign in on that side, and keep the terminal CLI as the fallback.

Anthropic's [VS Code page](https://code.claude.com/docs/en/vs-code) has no Remote-SSH section. The rule is in a note under its proxy troubleshooting: "In a window connected to WSL, an SSH host, a dev container, or another system, save the certificate file and edit ~/.claude/settings.json on that system, not on your local computer." Everything below follows from that sentence. We read Anthropic's and Microsoft's pages on 24 October 2026.

## Where Claude Code runs in a remote VS Code window #

VS Code splits extensions in two. Microsoft's [remote extension guide](https://code.visualstudio.com/api/advanced-topics/remote-extensions) says UI extensions "are always run on the user's local machine", while workspace extensions "are run on the same machine as where the workspace is located". Claude Code reads and edits your files and runs commands, so it belongs with the workspace. Anthropic's [dev container page](https://code.claude.com/docs/en/devcontainer) says the same for containers: the extension panel and claude in the integrated terminal "both run inside the container and share the same ~/.claude configuration".

| Window | Claude Code runs on | Its ~/.claude is | How you open it |
| --- | --- | --- | --- |
| Remote-SSH | the SSH host | in your home directory on the host | Remote-SSH: Connect to Host... |
| WSL | your Linux distro | in your Linux home, not in C:\Users | code . in a WSL terminal, or WSL: Connect to WSL |
| Dev container or Codespaces | the container | in the container's home, gone on rebuild unless you mount a volume | Dev Containers: Reopen in Container , or open the codespace |

Your laptop's Claude Code setup doesn't come along: not the sign-in, not ~/.claude/settings.json or your hooks, not the MCP servers saved in ~/.claude.json. The remote machine starts from zero. VS Code's own user settings are the exception: Microsoft's [remote troubleshooting page](https://code.visualstudio.com/docs/remote/troubleshooting) says they "are reused when you connect to a remote endpoint", so the extension's options in VS Code settings carry over.

The extension ships a separate build per platform, each with its own copy of the CLI for the chat panel. On [Open VSX](https://open-vsx.org/extension/Anthropic/claude-code), version 2.1.310 has builds for Windows, macOS, Linux and Alpine Linux on x64 and ARM64, and none for 32-bit ARM, so a 32-bit ARM host has nothing to install.

## How to set up Claude Code in a Remote-SSH window #

- Check that ssh you@host works from a normal terminal first. Microsoft's [Remote-SSH guide](https://code.visualstudio.com/docs/remote/ssh) starts there too.
- In VS Code, run Remote-SSH: Connect to Host... from the Command Palette and open your project folder on the host.
- Open the Extensions view (Cmd+Shift+X on a Mac, Ctrl+Shift+X elsewhere), search for "Claude Code" and click Install. In a remote window this installs it on the host, and it shows up under your SSH host's own installed list. If it appears dimmed under Local - Installed, click Install to put it on the host.
- Open a file, click the Spark icon at the top right of the editor, and click Sign in.
- Install the standalone CLI on the host as well, from the integrated terminal: curl -fsSL https://claude.ai/install.sh | bash. Anthropic's page explains why: "Installing the extension does not put claude on your shell PATH."

Anthropic lists VS Code 1.94.0 or later as the minimum. To get the extension on every host you connect to, add it to remote.SSH.defaultExtensions in your local settings.json:

json
"remote.SSH.defaultExtensions": ["anthropic.claude-code"]

## Claude Code in VS Code with WSL #

Open the project from inside WSL: cd to it in a WSL terminal and run code .. Microsoft's [WSL guide](https://code.visualstudio.com/docs/remote/wsl) says "most extensions will reside inside WSL", and an extension installed from the Extensions view lands in the right place.

Install the CLI in the distro with the Linux installer, not the Windows one; the native installer puts it at ~/.local/bin/claude. WSL also imports the Windows PATH, and Anthropic's troubleshooting page has the check: if which node or which npm prints a path starting with /mnt/c/, you're running Windows' Node.js, which matters if you installed Claude Code with npm. Keep the project in your Linux home rather than under /mnt/c, for the speed and search reasons in our [Windows vs WSL guide](https://shuriken.sh/guides/claude-code-windows-vs-wsl).

## Dev containers and Codespaces #

Anthropic's dev container feature, ghcr.io/anthropics/devcontainer-features/claude-code:1.0, installs the CLI, and "when you open the container in VS Code or Codespaces, the feature also adds the Claude Code VS Code extension". The catch is the rebuild: it throws the container's home away, sign-in included. The fix is a named volume plus CLAUDE_CONFIG_DIR, which our [Claude Code devcontainer guide](https://shuriken.sh/guides/claude-code-devcontainer) sets up line by line. Carrying a sign-in from one codespace to the next takes a Codespaces secret instead, set up step by step in [Claude Code in GitHub Codespaces](https://shuriken.sh/guides/claude-code-github-codespaces).

Shuriken adds a server of yours with one command, and its chats sit beside your computer's.

[Download](https://shuriken.sh/download)

## Signing in when the browser is on another machine #

The panel's Sign in button sends you to a browser on your own computer. The sign-in then has to find its way back to Claude Code on the remote machine. Anthropic's [login troubleshooting](https://code.claude.com/docs/en/troubleshoot-install) describes what happens in WSL2, over SSH and in containers: "the browser usually opens on a different host and its redirect can't reach Claude Code's local callback server."

When the panel never notices that you signed in, do it from the terminal instead:

- Open the integrated terminal. In a remote window it runs on the remote machine.
- Run claude auth login.
- Open the printed link in your own browser and approve.
- The browser shows a login code instead of returning to VS Code. Paste it into the terminal and press Enter.
- Back in the panel, run Developer: Reload Window if it still shows the sign-in screen.

The panel and the terminal share that machine's ~/.claude, so one login serves both. From WSL2, if no browser opens at all, Anthropic suggests pointing BROWSER at your Windows browser, for example export BROWSER="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe".

A Mac as the SSH host has one more trap. Claude Code keeps its login in the macOS Keychain, which can be locked when you come in over SSH. When the write fails, it saves the login to the plaintext ~/.claude/.credentials.json instead. claude doctor warns with macOS Keychain is not writable, and security unlock-keychain ~/Library/Keychains/login.keychain-db unlocks it.

## MCP servers on the remote machine #

Type /mcp in the panel, or run claude mcp add in the integrated terminal. Both save to the MCP configuration on the remote machine, and a stdio server starts there, so whatever it runs (npx, uvx, docker) has to be installed on the host or in the container. A remote HTTP server has to be reachable from that machine; reaching it from your laptop isn't enough. For servers the whole team needs, a project-scope .mcp.json at the repository root travels with the repo. Type /mcp in a new conversation to check that each one shows Connected; for one that shows Failed, see [why Claude Code MCP servers fail to connect](https://shuriken.sh/guides/claude-code-mcp-server-failed-to-connect).

## Claude Code remote SSH not working: what to check #

Most failures come from the extension or its settings sitting on the wrong side.

| What you see | Likely cause | Fix |
| --- | --- | --- |
| The panel tries to start claude.exe or uses C:\Users\... paths while connected to a Linux host | The extension is running locally | Install it on the host. Remove any remote.extensionKind entry that forces anthropic.claude-code to ["ui"] |
| A change to ~/.claude/settings.json does nothing | You edited your laptop's copy | Edit the file on the remote machine |
| claude not found in the integrated terminal | Only the extension is installed | Install the standalone CLI on the remote |
| Sign-in finishes in the browser, the panel keeps asking | The callback didn't reach the remote | claude auth login in the terminal, then reload the window |
| No Spark icon | No file open, or the folder isn't trusted | Open a file; trust the folder, because the extension doesn't work in Restricted Mode |

The first row is what a user reported in [issue #20226](https://github.com/anthropics/claude-code/issues/20226) in January 2026: a Windows laptop, an Ubuntu server, and an extension that looked for claude.exe and Windows paths. In [issue #21336](https://github.com/anthropics/claude-code/issues/21336), another user on Claude Code 2.1.20 and a RHEL 8.10 host saw sign-in appear to succeed while the panel spun. A bot closed both. In both threads, claude run directly in the SSH terminal is reported to work. A feature request for fuller Remote-SSH support, [issue #72448](https://github.com/anthropics/claude-code/issues/72448), was closed by a bot for inactivity on 20 August 2026 as not planned, and two users asked about it again in September and October.

So the dependable fallback is the CLI in the remote window's integrated terminal. Started there, it connects to VS Code by itself for diffs and diagnostics, and claude --resume picks up conversations you started in the panel, since the two share one history. Our [extension vs CLI comparison](https://shuriken.sh/compare/claude-code-vscode-extension-vs-cli) covers what each one can do. If the session has to outlive the VS Code window, start it in tmux on the host, as in our guide to [running Claude Code over SSH](https://shuriken.sh/guides/claude-code-over-ssh).

## How Shuriken does it #

Shuriken doesn't run Claude Code through a VS Code window. You add the machine as a server (Settings › Devices › Add device › A server, on Linux, macOS or Windows), and Shuriken runs the agents on it as a service that starts with the machine. Nothing has to stay open on your laptop, and there is no sign-in to do on the server: the accounts and keys you add to Shuriken reach it end-to-end encrypted, and so do the MCP servers you set up once in Shuriken. The [server page](https://shuriken.sh/server) has the short version.

VS Code stays where it is useful: reading the code. In the desktop app, a chat running on your own computer has Open in, which opens its worktree, or a file at its spot, in VS Code or one of the other apps on the menu ([the full list](https://shuriken.sh/features/open-anywhere)). Open in only works for chats on the computer you're sitting at. For a chat on a server, Run on… moves it, with its uncommitted work and its history, to the computer you're at or another of yours. It stays the same chat; only where it runs changes. To try it with your own machines, [download Shuriken](https://shuriken.sh/download).

Share

[X](https://x.com/intent/post?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-vscode-remote-ssh&text=Claude%20Code%20with%20VS%20Code%20Remote-SSH%2C%20WSL%20and%20containers)[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-vscode-remote-ssh)[Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-vscode-remote-ssh&t=Claude%20Code%20with%20VS%20Code%20Remote-SSH%2C%20WSL%20and%20containers)[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-vscode-remote-ssh&title=Claude%20Code%20with%20VS%20Code%20Remote-SSH%2C%20WSL%20and%20containers)[E-mail](mailto:?subject=Claude%20Code%20with%20VS%20Code%20Remote-SSH%2C%20WSL%20and%20containers&body=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-vscode-remote-ssh)

## Sources

- [Claude Code docs: Use Claude Code in VS Code](https://code.claude.com/docs/en/vs-code) (accessed 24 October 2026)
- [Claude Code docs: Troubleshoot installation and login](https://code.claude.com/docs/en/troubleshoot-install) (accessed 24 October 2026)
- [Claude Code docs: Development containers](https://code.claude.com/docs/en/devcontainer) (accessed 24 October 2026)
- [VS Code docs: Remote development using SSH](https://code.visualstudio.com/docs/remote/ssh) (accessed 24 October 2026)
- [VS Code docs: Developing in WSL](https://code.visualstudio.com/docs/remote/wsl) (accessed 24 October 2026)
- [VS Code docs: Remote development tips and tricks](https://code.visualstudio.com/docs/remote/troubleshooting) (accessed 24 October 2026)
- [VS Code API docs: Supporting remote development](https://code.visualstudio.com/api/advanced-topics/remote-extensions) (accessed 24 October 2026)
- [Open VSX: Anthropic.claude-code](https://open-vsx.org/extension/Anthropic/claude-code) (accessed 24 October 2026)
- [GitHub issue #20226: VS Code extension does not work with Remote-SSH](https://github.com/anthropics/claude-code/issues/20226) (accessed 24 October 2026)
- [GitHub issue #21336: VSCode Remote SSH enabledPlatforms TypeError](https://github.com/anthropics/claude-code/issues/21336) (accessed 24 October 2026)
- [GitHub issue #72448: Hope Claude Code for VSCode supports remote SSH](https://github.com/anthropics/claude-code/issues/72448) (accessed 24 October 2026)

## Frequently asked questions

**Does the Claude Code VS Code extension work over Remote-SSH?**

Yes, when it is installed on the SSH host: in a remote window it runs there, next to your files. When it runs on your local side instead, users have reported it looking for local paths and a local claude binary, and failing.

**Where is ~/.claude when I use Claude Code in a remote VS Code window?**

On the remote machine: the SSH host, your WSL distro or the container. Anthropic's VS Code page says to edit ~/.claude/settings.json on that system, not on your local computer.

**How do I sign in to Claude Code on a remote server without a browser?**

Run claude auth login in the window's integrated terminal, open the printed link in your own browser, and paste the code it shows back into the terminal. The panel shares that machine's ~/.claude; reload the window if it still asks you to sign in.

**Why is claude not found in the VS Code terminal on my remote host?**

The extension bundles a private copy of the CLI for its panel and doesn't put claude on your PATH. Install the standalone CLI on the remote machine itself.

**Do my local MCP servers work in a Remote-SSH window?**

No. The extension reads the MCP configuration on the remote machine and starts stdio servers there, so add them on that side and install the commands they run.

Servers

Your agents on your own servers.

Add a Linux, macOS or Windows server from the app with one command. It runs as a service and updates itself.

[Download](https://shuriken.sh/download)

[Other platforms](https://shuriken.sh/download#main)

## Keep reading

- [How to install Shuriken on Mac, Windows and Linux: Guide 27 Oct 2026 3 min read Install Shuriken from shuriken.sh on Mac, Windows or Linux. The Mac app is notarised by Apple; Windows may warn once, as its installer isn't signed yet.](https://shuriken.sh/guides/install-shuriken)
- [Claude Code on a VPS: sizing, setup and staying safe: Guide 27 Oct 2026 7 min read Claude Code runs on a VPS with 4 GB of RAM, an x64 or ARM64 CPU and Ubuntu 20.04+ or Debian 10+, used from a supported country. How to size and secure it.](https://shuriken.sh/guides/claude-code-on-a-vps)
- [Run Claude Code on an always-on machine: Guide 27 Oct 2026 6 min read Run Claude Code on a home server, mini PC or VM that never sleeps: install, headless sign-in, tmux, remote access, or add it as a Shuriken server.](https://shuriken.sh/guides/claude-code-on-an-always-on-machine)
- [Claude Code on a Raspberry Pi: what works: Guide 27 Oct 2026 8 min read Claude Code runs on a Raspberry Pi 4 or 5 with 4 GB of RAM or more and the 64-bit Raspberry Pi OS. Which boards qualify, the 32-bit trap, and the setup.](https://shuriken.sh/guides/claude-code-raspberry-pi)
- [Claude Code teleport: pull cloud sessions to your terminal: Guide 27 Oct 2026 6 min read claude --teleport pulls a Claude Code cloud session and its branch into your terminal. It needs a clean tree, the same repo and the same claude.ai account.](https://shuriken.sh/guides/claude-code-teleport-cloud-sessions)
- [Install Claude Code on Linux: Ubuntu, Fedora, Alpine: Guide 27 Oct 2026 8 min read To install Claude Code on Linux, run curl -fsSL https://claude.ai/install.sh | bash, or add Anthropic's signed apt, dnf or apk repository.](https://shuriken.sh/guides/install-claude-code-on-linux)
- [Claude Code headless mode (-p): scripts, CI and cost caps: Guide 27 Oct 2026 5 min read Claude Code headless mode is claude -p: one prompt in, one answer out, no terminal UI. The flags that cap spend and tools, output formats, and CI.](https://shuriken.sh/guides/claude-code-headless-mode)
- [Codex remote control: run Codex from your phone: Guide 27 Oct 2026 7 min read Codex remote control runs through the ChatGPT mobile app and a paired Mac or Windows PC. Linux works only as an SSH host; the CLI command is experimental.](https://shuriken.sh/guides/codex-remote-control-from-phone)

## Free tools

- [Claude limit reset tracker](https://shuriken.sh/tools/limit-resets/claude)
- [Codex limit reset tracker](https://shuriken.sh/tools/limit-resets/codex)
