You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: SSH through Wrangler is now enabled by default for Containers
3
+
description: SSH through Wrangler is now enabled by default. Add a public key to connect, or opt out in your Container configuration.
4
+
products:
5
+
- containers
6
+
date: 2026-05-12
7
+
---
8
+
9
+
import { WranglerConfig } from"~/components";
10
+
11
+
SSH through Wrangler is now enabled by default for [Containers](/containers/). Previously, you had to set `ssh.enabled` to `true` in your Container configuration before you could connect.
12
+
13
+
This change does not expose any publicly accessible ports on your Container. The SSH service is reachable only through [`wrangler containers ssh`](/workers/wrangler/commands/containers/#containers-ssh), which authenticates against your Cloudflare account. You also need to add an `ssh-ed25519` public key to `authorized_keys` before anyone can connect, so enabling SSH alone does not grant access.
14
+
15
+
To connect, add a public key to your Container configuration and run `wrangler containers ssh <INSTANCE_ID>`:
16
+
17
+
<WranglerConfig>
18
+
19
+
```jsonc
20
+
{
21
+
"containers": [
22
+
{
23
+
"authorized_keys": [
24
+
{
25
+
"name":"<NAME>",
26
+
"public_key":"<YOUR_PUBLIC_KEY_HERE>",
27
+
},
28
+
],
29
+
},
30
+
],
31
+
}
32
+
```
33
+
34
+
</WranglerConfig>
35
+
36
+
To disable SSH, set `ssh.enabled` to `false` in your Container configuration:
37
+
38
+
<WranglerConfig>
39
+
40
+
```jsonc
41
+
{
42
+
"containers": [
43
+
{
44
+
"ssh": {
45
+
"enabled":false,
46
+
},
47
+
},
48
+
],
49
+
}
50
+
```
51
+
52
+
</WranglerConfig>
53
+
54
+
For more information, refer to the [SSH documentation](/containers/ssh/).
Copy file name to clipboardExpand all lines: src/content/docs/containers/ssh.mdx
+6-9Lines changed: 6 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,19 +10,19 @@ products:
10
10
11
11
import { WranglerConfig } from"~/components";
12
12
13
-
Anyone with write access to a Container can SSH into it with Wrangler as long as SSH is enabled.
13
+
Anyone with write access to a Container can SSH into it with Wrangler as long as a matching public key is listed in `authorized_keys`.
14
+
15
+
SSH does not expose a publicly accessible port on the Container. The only way to connect is through Wrangler with [`wrangler containers ssh`](/workers/wrangler/commands/containers/#containers-ssh), which authenticates against your Cloudflare account.
14
16
15
17
## Configure SSH
16
18
17
19
SSH can be configured in your [Container's configuration](/workers/wrangler/configuration/#containers) with the `ssh` and `authorized_keys` properties. Only the `ssh-ed25519` key type is supported.
18
20
19
-
The `ssh.enabled` property only controls whether you can SSH into a Container through Wrangler.
20
-
If `ssh.enabled` is false but keys are still present in `authorized_keys`, the SSH service will still be started on the Container.
21
+
The `ssh.enabled` property only controls whether you can SSH into a Container through Wrangler. It defaults to `true`. Set it to `false` to disable SSH access completely.
21
22
22
23
## Connect with Wrangler
23
24
24
-
To SSH into a Container with Wrangler, you must first enable SSH in your Container configuration.
25
-
The following example shows a basic configuration:
25
+
To SSH into a Container with Wrangler, add an `ssh-ed25519` public key to `authorized_keys` in your Container configuration. The following example shows a basic configuration:
26
26
27
27
<WranglerConfig>
28
28
@@ -31,9 +31,6 @@ The following example shows a basic configuration:
Without the [`containers_pid_namespace`](/workers/configuration/compatibility-flags/#use-an-isolated-pid-namespace-for-containers) compatibility flag, all processes inside the VM are visible when you connect to your Container through SSH. This flag is turned on by default for Workers with a [compatibility date](/workers/configuration/compatibility-dates/) of `2026-04-01` or later.
61
+
Without the [`containers_pid_namespace`](/workers/configuration/compatibility-flags/#use-an-isolated-pid-namespace-for-containers) compatibility flag, all processes inside the VM are visible when you connect to your Container through SSH. This flag is turned on by default for Workers with a [compatibility date](/workers/configuration/compatibility-dates/) of `2026-04-01` or later.
0 commit comments