> 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-testing/chaos-faults/ssh.md). Agents can also search and read this documentation through its [MCP server](https://developer.harness.io/~gitbook/mcp).

# SSH

SSH chaos faults that run your own chaos and abort scripts on a remote host over SSH from a Kubernetes chaos infrastructure.

SSH faults connect from a Kubernetes chaos infrastructure to a remote host over SSH and run chaos and abort scripts you provide. Use them for host-level chaos that no built-in fault covers, or to reuse scripts you already have, without installing a chaos infrastructure on the target host.

***

## Before you begin

* **Chaos infrastructure:** A Kubernetes chaos infrastructure that can reach the target host on its SSH port. Go to [Get started](https://developer.harness.io/resilience-testing/chaos-testing/get-started.md) to install one.
* **SSH credentials:** The SSH password or private key is stored in Harness Secret Manager, as a text secret for a password or a file secret for a key. Go to [Add and reference text secrets](https://developer.harness.io/harness-platform/use-harness-platform/secrets/add-use-text-secrets) to create one.
* **Scripts:** The chaos and abort scripts are stored in ConfigMaps in the chaos infrastructure namespace. Go to [SSH chaos](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/ssh/ssh-chaos.md#before-you-begin) to create them.

***

## Supported environments

SSH faults target any Linux host that runs an SSH server and that the chaos infrastructure can reach: VMs on premises, on VMware, or in any public cloud, and bare-metal hosts. Windows hosts and containers without an SSH server are not supported.

***

## Faults

| Fault                                                                                                    | What it does                                         | Failure type | Reversible |
| -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ------------ | ---------- |
| [SSH chaos](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/ssh/ssh-chaos.md) | Runs your chaos and abort scripts on a host over SSH | State        | Partial    |

***

## Troubleshooting

<details>

<summary>An SSH fault fails to connect to the host</summary>

The chaos infrastructure cannot reach the host, or the credentials are wrong. Check that network policies, security groups, and routes allow traffic from the cluster to the host on its SSH port, and that the secret holds the password or key for `USERNAME`.

</details>

***

## Next steps

* Go to [SSH fault permissions](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/ssh/permissions.md) to check the privileges the fault needs.
* Go to [SSH chaos](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/ssh/ssh-chaos.md) to write and run your scripts.

{% @harness-feedback/feedback %}
