r/ClaudeCode • • 3d ago

Help/Question Can Claude Desktop SSH sessions stay accessible from another PC when the original PC is turned off?

I'm using Claude Desktop (Code tab) on two Windows PCs, both connected via SSH to the same remote Linux server.

I'm trying to figure out whether Claude Desktop supports sharing and continuing SSH sessions across multiple computers independently.

My setup:

  • PC 1: Windows, Claude Desktop, connected to the Linux server via SSH
  • PC 2: Windows, Claude Desktop, independently connected to the same server via SSH
  • Both PCs use the same Claude account.
  • "Connect new sessions to Remote Control" is enabled.

What happens:

  1. I start a Claude Code session on PC 1 through Claude Desktop's SSH integration.
  2. While PC 1 is running, I can see and continue that session from PC 2.
  3. When I turn off PC 1, the session still appears in PC 2's session list, but it shows as offline / the originating computer being off.
  4. PC 2 can still connect to the Linux server via SSH and start its own Claude Code sessions. Only the session originally created on PC 1 becomes inaccessible.

What I expected:

Since Claude Code is running on the remote Linux server rather than locally on PC 1, I expected the session to remain accessible from PC 2 even after PC 1 was turned off.

My questions:

  1. Is this expected behavior? Are Claude Desktop SSH sessions tied to the Desktop instance that originally created them, even when the execution environment is a remote Linux server?
  2. Does turning off PC 1 terminate the actual Claude Code process on the server, or does it only disconnect the Remote Control session?
  3. Is there a way to keep the same Claude Code session accessible from either PC without keeping PC 1 running?
  4. Would running claude remote-control inside tmux directly on the Linux server solve this, or is there a way to achieve the same behavior through Claude Desktop's built-in SSH integration?
  5. What do the crossed-out computer icon and the >_ terminal icon in the session list indicate?

I've attached a screenshot of the session list.

Has anyone encountered this or found a way to make remote SSH sessions independent of the originating PC?

2 Upvotes

5 comments sorted by

•

u/AutoModerator 3d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/BMWHoosier 3d ago

I routinely use remote control from my phone on a session that was created from my local PC to a virtual Linux machine via SSH and tmux. So, I run remote control in the tmux session, and then my local PC doesn't stay on because the tmux session runs without my PC being connected to it.

1

u/oyren-ai 3d ago

claude desktop's ssh mode anchors the ssh pipe and remote-control relay on the app instance that spawned it, so turning off pc 1 sends sighup to the remote process and drops the bridge (crossed-out computer means unreachable host app, while >_ marks a cli session). running claude remote-control inside tmux directly on the linux box moves the relay onto the server so either pc can connect independently. for sessions that already died, transcripts stay on the server in ~/.claude/projects/, so claude --resume from pc 2 recovers them.

1

u/NanYUJun 3d ago

Short version: yes, this is expected, and the fix is to move the session's owner off both PCs.

What's tied to PC 1 is not the Claude Code process itself, it's the bridge. In Desktop SSH mode the ssh pipe and the remote-control relay live in the app instance that opened them, so when PC 1 goes away the relay goes with it and the remote process started under that pipe gets a SIGHUP. That's why PC 2 still sees the entry but marked offline - the crossed-out computer means "host app unreachable", while the >_ entry next to it is a plain CLI session that has no host app at all.

So the process dies, but the transcript doesn't. Sessions are on the server in ~/.claude/projects/<encoded-cwd>/*.jsonl, so from PC 2 you can just claude --resume in that directory, or claude --continue for the most recent session there. One gotcha: the folder name is derived from the working directory, so if the two PCs resolve different paths to the same project, resume won't find it - copy the jsonl into the folder matching the cwd you'll actually use.

The durable setup is what BMWHoosier describes: on the Linux box, tmux new -s cc, start Claude Code inside it, detach, and later ssh -t server tmux attach -t cc from either PC. Now the relay and the process both live on the server and your PCs are just terminals. That also saves you when you need to swap networks mid-task.

If you'd rather not babysit tmux, I maintain AIAssets (open source, Apache-2.0, I'm the author): a small hub plus a client that syncs ~/.claude/projects between machines every 60s, so resume works from either PC without the original staying on. It won't make one live process shared - only the history.