# ed machines disconnect

> ed machines disconnect in the Edith ed command line reference. Closes the shared SSH connection to a machine.

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

Closes the shared SSH connection to a machine.

```
ed machines disconnect <machine> [--json]
```

## Arguments

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `<machine>` | string, required | none | Machine name, ssh alias, id or unambiguous prefix. |

## 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 disconnect devbox
disconnected
```

## `--json` shape

```json
{
  "connected": false,
  "machine": "Devbox"
}
```

## Examples

```
ed machines disconnect devbox
ed machines disconnect devbox --json
```

## Behaviour notes

This is the one connection verb that does not dial: it resolves the machine,
sends `ssh -O exit` down the control socket, and deletes the socket file. A
machine that was not connected is reported as disconnected and exits 0, rather
than being treated as an error.

It closes the connection the app shares, so any port forwards opened with
`ed machines forwards on` go down with it, and the app's own Machines view
reconnects the next time it needs to.

An unknown machine name exits 3. Nothing else here can fail.

## 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
