[BUG] Claude Code crashes or fails with EACCES when connected via SSH to fresh Ubuntu server

Resolved 💬 3 comments Opened May 1, 2026 by GDimitrovBG Closed May 31, 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?

When connected to a remote server via SSH, Claude Code fails to create or modify files and throws an "EACCES: permission denied" error.

This happens immediately after accepting the file write permission prompt.

In some cases, Claude Code also crashes entirely with "process exited with code 1" right after establishing the SSH connection.

The same server works correctly with other tools (e.g. Cursor), where file creation and editing over SSH function normally.

This suggests the issue is specific to Claude Code's SSH environment or file handling.

What Should Happen?

Claude Code should be able to create and modify files on the remote server via SSH without permission errors or crashes, just like standard SSH clients or other development tools.

Error Messages/Logs

1. Connect to a remote Ubuntu server via SSH using Claude Code (root user)

2. Accept the connection and file access permissions

3. Try to create or modify a file (e.g. create a Python file like test.py)

4. Claude attempts the operation

5. Result:
   - Either fails with: "EACCES: permission denied"
   - Or Claude Code crashes with: "process exited with code 1"

Steps to Reproduce

EACCES: permission denied

In some cases:
Claude Code process exited with code 1

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude 1.5354.0 (9a9e3d) 2026-04-29T01:14:34.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • SSH connection itself works correctly (can connect and operate normally via terminal)
  • The issue only occurs inside Claude Code when attempting file operations
  • Server is a Hetzner VPS (Ubuntu 24.04, 4GB RAM, 2 vCPU)
  • Node.js and basic development tools are installed
  • The server was previously used with Cursor AI without any permission or file access issues
  • No swap was initially configured (added later, no change)
  • Issue persists after system updates and reboot

View original on GitHub ↗

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