> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/resilience-testing/chaos-engineering/faults/chaos-fault-categories/ssh/ssh.md).

# Chaos faults for SSH

### Introduction <a href="#introduction" id="introduction"></a>

SSH chaos injects user-defined chaos on a remote VM by executing custom scripts (inject and rollback) over SSH. Use it when the chaos you want to run is not covered by a first-class fault, when you need to run a pre-built script that already exists in your operations toolkit, or when you want a portable framework for the long tail of one-off resilience tests.

<table data-view="cards"><thead><tr><th></th><th></th><th><select multiple><option value="u_HTSdDB" label="ssh" color="blue"></option></select></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>SSH chaos</strong></td><td>Run a user-supplied inject script on a remote host over SSH for a configurable duration, with a rollback script invoked on completion or abort.</td><td><span data-option="u_HTSdDB">ssh</span></td><td><a href="#ssh-chaos">#ssh-chaos</a></td></tr></tbody></table>

#### SSH chaos <a href="#ssh-chaos" id="ssh-chaos"></a>

SSH chaos runs a user-supplied inject script on a remote host over SSH for a configurable duration and runs a rollback script when the duration ends or the experiment is aborted. Scripts are passed through a ConfigMap; SSH credentials (`SSH_PASSWORD` and `SSH_KEY`) are referenced from Harness Secret Manager.

<details>

<summary>Use cases</summary>

Use as a customizable framework when the long-tail chaos you need (custom network rules, custom service restarts, custom database failovers) is not covered by a first-class fault. The rollback script ensures the target host returns to baseline on completion or abort.

</details>

<a href="/resilience-testing/chaos-engineering/faults/chaos-fault-categories/ssh/ssh-chaos.md" class="button primary">View details</a>

{% @harness-feedback/feedback %}
