Skip to content

Commit 70a90fc

Browse files
committed
update ssh copy and rename expose ssh to just ssh
1 parent 4e0fc7f commit 70a90fc

3 files changed

Lines changed: 34 additions & 21 deletions

File tree

sandboxes/_data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export const sidebar = [
2727
href: "/sandboxes/expose_http/",
2828
},
2929
{
30-
title: "Expose SSH",
31-
href: "/sandboxes/expose_ssh/",
30+
title: "SSH",
31+
href: "/sandboxes/ssh/",
3232
},
3333
{
3434
title: "Manage Deploy apps",
Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: "Expose SSH"
2+
title: "SSH"
33
description: "How to open secure SSH access into a sandbox for interactive debugging, editor sessions, or long-running processes."
44
---
55

66
Sandboxes can hand out SSH credentials so you can inspect the filesystem, tail
7-
logs, run editors, or forward ports while the microVM stays isolated on the
8-
Deploy edge.
7+
logs, run editors, or forward ports. SSH access is available both in your
8+
terminal as a command and in the Deno Deploy Sandbox UI.
99

1010
```tsx
1111
import { Sandbox } from "@deno/sandbox";
@@ -24,18 +24,10 @@ script releases its references (for example, the `await using` block ends) the
2424
sandbox shuts down and the SSH endpoint disappears; you can also call
2525
`sandbox.kill()` if you need to tear it down immediately.
2626

27-
## When to use SSH access
28-
29-
- Debugging agent-generated code that only fails in the sandbox
30-
- Editing files with a full-screen terminal editor or remote VS Code
31-
- Streaming logs in real time without instrumenting application code
32-
- Running profiling or inspection tools that are easier to use manually
33-
34-
Because each sandbox is already isolated, opening SSH does not compromise other
35-
projects or organizations.
36-
3727
## Connecting from your machine
3828

29+
### exposeSsh method
30+
3931
1. Request credentials via `sandbox.exposeSsh()`.
4032
2. Connect using the provided username and hostname:
4133

@@ -46,13 +38,34 @@ ssh ${username}@${hostname}
4638
3. Use regular terminal workflows: copy files, run top, tail logs, or attach to
4739
running processes.
4840

49-
:::tip
41+
## In the terminal
42+
43+
You can SSH into your sandbox from the terminal using the `--ssh` flag when
44+
running your script:
45+
46+
```bash
47+
deno sandbox create -ssh
48+
```
49+
50+
## In the Deno Deploy console
51+
52+
After creating a sandbox, you can SSH into it in the Deno Deploy web app.
5053

51-
Tip: combine SSH with
52-
[port forwarding](https://man.openbsd.org/ssh#LOCAL_FORWARDING) to view dev
53-
servers that are bound to `localhost` inside the sandbox.
54+
1. Log in to [console.deno.com](https://console.deno.com/) and navigate to the
55+
"Sandboxes" section.
56+
2. Either create a new sandbox or select an existing one from the list.
57+
3. Click **Start SSH terminal** to open an interactive terminal session in your
58+
browser.
5459

55-
:::
60+
## When to use SSH access
61+
62+
- Debugging agent-generated code that only fails in the sandbox
63+
- Editing files with a full-screen terminal editor or remote VS Code
64+
- Streaming logs in real time without instrumenting application code
65+
- Running profiling or inspection tools that are easier to use manually
66+
67+
Because each sandbox is already isolated, opening SSH does not compromise other
68+
projects or organizations.
5669

5770
## Security considerations
5871

sandboxes/timeouts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ Coming soon.
5656
provisioning.
5757
- `Sandbox.connect({ id })` – resume control of a duration-based sandbox.
5858
- `Sandbox.kill()` – terminate early.
59-
- [`Expose HTTP`](./expose_http.md) and [`Expose SSH`](./expose_ssh.md) – note
59+
- [`Expose HTTP`](./expose_http.md) and [`SSH`](./ssh.md) – note
6060
that their URLs/credentials die with the sandbox lifetime.

0 commit comments

Comments
 (0)