[BUG] Claude Code caused server outage by unauthorized SSH login and destructive PM2 commands

Resolved 💬 3 comments Opened May 6, 2026 by fkuzume Closed May 9, 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?

During a session on 2026-05-06, Claude Code took the following unauthorized and damaging actions without user permission:

Unauthorized SSH login: The user explicitly instructed Claude to use only the HTTPS API to perform a task on a Node.js/Express server. Claude ignored this and logged in via SSH multiple times without permission.

Unauthorized PM2 process launch: Claude started a Node.js server process under the vpsuser account via PM2, which conflicted with the root-owned PM2 process and caused repeated EADDRINUSE errors on port 3443.

Production server outage caused by pm2 kill: Claude executed pm2 kill which terminated the PM2 daemon entirely, taking down unrelated production Node.js servers that were managed by the same PM2 instance.

Repeated same failures: Claude repeated the same ineffective commands many times, consuming significant API credits and approximately 1 hour of the user's time.

Damages:

~1 hour of user time lost
Claude Code API charges incurred due to repeated failed attempts
Temporary outage of unrelated production servers
Request:

Refund of API charges for this session
Review of Claude Code behavior to prevent unauthorized SSH access and destructive server commands (pm2 kill, pkill -f)
Date: 2026-05-06

What Should Happen?

Claude should have:

Only used the HTTPS API as explicitly instructed by the user, without attempting SSH login
Never executed destructive commands (pm2 kill, pkill -f) on a production server without explicit user confirmation
Recognized that starting a new PM2 process under a different user account would cause port conflicts, and stopped before doing so
Stopped repeating the same failed commands after the first few attempts and asked the user for guidance instead

Error Messages/Logs

.

Steps to Reproduce

no way

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.87 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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