# ed machines forwards off

> ed machines forwards off in the Edith ed command line reference. Closes a saved forward.

- Canonical URL: https://getedith.pro/docs/cli/machines/forwards-off
- Updated: 2026-12-02

Closes a saved forward.

```
ed machines forwards off <machine> <index> [--json]
```

## Arguments

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `<machine>` | string, required | none | Machine name, ssh alias, id or unambiguous prefix. |
| `<index>` | integer, counting from 1 | none | The forward's position in `ed machines forwards ls`. |

## Options

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `--json` | flag | off | Emit JSON on stdout instead of the line. |
| `--help`, `-h` | flag | off | Print the help for this command on stdout and exit 0. |

```
$ ed machines forwards off devbox 1
closed 127.0.0.1:3000:localhost:3000
```

## `--json` shape

The same object `on` emits, with `"open": false`.

## Examples

```
ed machines forwards off devbox 1
ed machines forwards off devbox 1 --json
```

## Behaviour notes

Sends `ssh -O cancel -L <spec>` and ignores what ssh says about it, so closing a
forward that was never open is reported as closed and exits 0 rather than being
treated as an error.

Like `on`, it opens the shared connection first. Closing a forward on a machine
that is currently disconnected therefore dials the machine to do nothing, and
exits 4 if it cannot.

## Where to go next

- [`ed machines`](https://getedith.pro/docs/cli/machines), the rest of this group
- [All `ed` commands](https://getedith.pro/docs/cli)

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
