# pier ssh

> Open a shell in a running app

URL: https://pier.run/docs/cli/reference/ssh

```bash
pier ssh [<app>] [<command>] [flags]
```

Open a shell in a running app.

## Arguments

| Argument    | Required | Description                                                                       |
| ----------- | -------- | --------------------------------------------------------------------------------- |
| `<app>`     | no       | App ref (slug, slug/target, or slug/target/instance; uses current app if omitted) |
| `<command>` | no       | Command to run (default: /bin/sh)                                                 |

## Flags

| Flag    | Value | Default             | Description             |
| ------- | ----- | ------------------- | ----------------------- |
| `--key` |       | `~/.ssh/id_ed25519` | Path to SSH private key |

[Global flags](/docs/cli/reference#global-flags) apply to every command.
