[BUG] Claude for Windows SSH Mode Silently Fails When Connecting as Root to Linux Server

Resolved 💬 2 comments Opened Mar 22, 2026 by AjvenSK Closed Mar 22, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Hi Anthropic Support Team,

I'm reporting a bug in the Claude for Windows desktop app's SSH mode that causes silent disconnections with no meaningful error shown to the user. After extensive debugging, I identified two root causes that may affect other users running Claude Code on Linux servers as root.

---

ENVIRONMENT

  • Client: Claude for Windows v1.1.7714
  • Server OS: Debian 11 (TurnkeyLinux LAMP LXC running on Proxmox)
  • Claude Code on server: v2.1.81
  • Server user: root

---

ROOT CAUSE 1 — --allow-dangerously-skip-permissions rejected for root users

When the Windows desktop app launches ccd-cli on the remote server via SSH, it unconditionally passes the --allow-dangerously-skip-permissions flag. Claude Code explicitly blocks this flag when running as root/sudo, producing the error:

"--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons"

This causes ccd-cli to exit with code 1. The session disconnects immediately with no error shown in the app UI — it just goes blank or shows "Disconnected". This makes the issue extremely difficult to diagnose.

ROOT CAUSE 2 — Low ulimit -n (open files) on the server

The default open files limit on the server was 1024, which is insufficient for Claude Code to operate properly in the SSH remote server context. This caused secondary failures during our debugging process.

---

WORKAROUND

Replace /root/.claude/remote/ccd-cli with a wrapper script:

#!/bin/bash
ulimit -n 65536
args=("$@")
newargs=()
for arg in "${args[@]}"; do
if [[ "$arg" != "--allow-dangerously-skip-permissions" ]]; then
newargs+=("$arg")
fi
done
exec /usr/bin/claude "${newargs[@]}"

This strips the problematic flag and raises the file descriptor limit before launching the real claude binary.

---

What Should Happen?

SUGGESTED FIXES

  1. The app should detect when connecting as root and not send --allow-dangerously-skip-permissions, OR gracefully handle the rejection with a clear user-facing error message instead of silently disconnecting.
  1. The error message from ccd-cli should be surfaced in the app UI so users can diagnose the issue without needing to inspect server-side logs.
  1. The remote server setup documentation should specify the minimum ulimit -n requirement.
  1. Consider adding a pre-flight check when establishing SSH sessions that validates the remote environment (ulimit, user privileges, claude version) and reports issues clearly before attempting to launch ccd-cli.

Error Messages/Logs

NONE! This crash happened silently - that's why it took more than a day to identify and resolve. Hope it helps others.

Steps to Reproduce

Prerequisites:
Claude for Windows desktop app v1.1.7714 (or similar)
A Linux server running as root (tested on Debian 11 / TurnkeyLinux)
SSH access configured with key authentication
Claude Code v2.1.81 installed on the Linux server via npm

Steps:
Open Claude for Windows desktop app
Go to the Code tab
Click New session
Add an SSH connection with:

Host: root@<server-ip>
Port: 22
Identity file: path to private key

Save and connect
Add a project folder on the remote server
Type any message (e.g. "Hi") and press Enter
Observe: session immediately disconnects, no response shown in UI

Expected behavior:
Claude responds to the message normally.
Actual behavior:
Session silently disconnects with no error message. UI shows blank or "Disconnected".
To confirm the root cause, on the Linux server run:
bashtail -f /root/.claude/remote/remote-server.log

Then trigger a connection — you will see:

Process exited with code 1

And in the wrapper log:

--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
Workaround: See wrapper script above.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude for Windows desktop app v1.1.7714

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗