Skip to content

Commit 1bebb07

Browse files
Deploying to gh-pages from @ dstackai/dstack@8422e48 🚀
1 parent 2003269 commit 1bebb07

4 files changed

Lines changed: 42 additions & 34 deletions

File tree

docs/guides/cli-api.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ $ dstack apply -f .dstack.yml
158158

159159
!!! info "Attached by default"
160160
For run configurations, `dstack apply` automatically attaches after
161-
submitting the run. This streams logs, forwards declared ports, and
162-
configures SSH access. See [Attach to runs](#attach-to-runs).
161+
submitting the run. This configures SSH access, forwards declared ports, and
162+
streams logs. See [Attach to runs](#attach-to-runs).
163163

164164
Use `-d` to submit in detached mode.
165165

@@ -181,24 +181,26 @@ $ dstack attach <run name>
181181
`dstack attach <run name>`, the CLI downloads the current user's built-in
182182
private SSH key if needed and stores it under `~/.dstack/ssh/`.
183183

184-
While attached, the CLI updates `~/.dstack/ssh/config` with the run name as
185-
an SSH host alias and ensures this file is included from `~/.ssh/config`:
184+
While attached, the CLI updates `~/.dstack/ssh/config` and ensures this file
185+
is included from `~/.ssh/config`. The file contains a `Host <run name>`
186+
alias used by `ssh <run name>` to SSH into the run container:
186187

187188
<div editor-title="~/.dstack/ssh/config">
188189

189190
```ssh-config
190-
Host &lt;run name&gt;
191-
HostName localhost
192-
Port &lt;local SSH port&gt;
193-
User root
194-
IdentityFile ~/.dstack/ssh/&lt;key&gt;
191+
Host <run name>
192+
HostName <host>
193+
Port <ssh port>
194+
User <user>
195+
IdentityFile <private user SSH key>
195196
IdentitiesOnly yes
196197
```
197198

198199
</div>
199200

200-
For VM-based and SSH fleets, `dstack` may also configure the
201-
`<run name>-host` alias for SSH access to the host.
201+
> For [VM-based backends](../concepts/backends.md#vm-based) and
202+
> [SSH fleets](../concepts/fleets.md), `dstack` may add an additional alias
203+
> `<run name>-host` and use it as a proxy jump for `ssh <run name>`.
202204

203205
While attached, connect to the run with:
204206

docs/guides/cli-api/index.html

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5179,8 +5179,8 @@ <h3 id="submit-runs">Submit runs<a class="headerlink" href="#submit-runs" title=
51795179
<div class="admonition info">
51805180
<p class="admonition-title">Attached by default</p>
51815181
<p>For run configurations, <code>dstack apply</code> automatically attaches after
5182-
submitting the run. This streams logs, forwards declared ports, and
5183-
configures SSH access. See <a href="#attach-to-runs">Attach to runs</a>.</p>
5182+
submitting the run. This configures SSH access, forwards declared ports, and
5183+
streams logs. See <a href="#attach-to-runs">Attach to runs</a>.</p>
51845184
<p>Use <code>-d</code> to submit in detached mode.</p>
51855185
</div>
51865186
<h3 id="attach-to-runs">Attach to runs<a class="headerlink" href="#attach-to-runs" title="Permanent link">&para;</a></h3>
@@ -5198,19 +5198,23 @@ <h3 id="attach-to-runs">Attach to runs<a class="headerlink" href="#attach-to-run
51985198
<p>During <code>dstack apply</code> in attached mode and during
51995199
<code>dstack attach &lt;run name&gt;</code>, the CLI downloads the current user's built-in
52005200
private SSH key if needed and stores it under <code>~/.dstack/ssh/</code>.</p>
5201-
<p>While attached, the CLI updates <code>~/.dstack/ssh/config</code> with the run name as
5202-
an SSH host alias and ensures this file is included from <code>~/.ssh/config</code>:</p>
5201+
<p>While attached, the CLI updates <code>~/.dstack/ssh/config</code> and ensures this file
5202+
is included from <code>~/.ssh/config</code>. The file contains a <code>Host &lt;run name&gt;</code>
5203+
alias used by <code>ssh &lt;run name&gt;</code> to SSH into the run container:</p>
52035204
<div editor-title="~/.dstack/ssh/config">
5204-
<div class="highlight"><pre><span></span><code>Host &amp;lt;run name&amp;gt;
5205-
HostName localhost
5206-
Port &amp;lt;local SSH port&amp;gt;
5207-
User root
5208-
IdentityFile ~/.dstack/ssh/&amp;lt;key&amp;gt;
5205+
<div class="highlight"><pre><span></span><code>Host &lt;run name&gt;
5206+
HostName &lt;host&gt;
5207+
Port &lt;ssh port&gt;
5208+
User &lt;user&gt;
5209+
IdentityFile &lt;private user SSH key&gt;
52095210
IdentitiesOnly yes
52105211
</code></pre></div>
52115212
</div>
5212-
<p>For VM-based and SSH fleets, <code>dstack</code> may also configure the
5213-
<code>&lt;run name&gt;-host</code> alias for SSH access to the host.</p>
5213+
<blockquote>
5214+
<p>For <a href="../../concepts/backends/#vm-based">VM-based backends</a> and
5215+
<a href="../../concepts/fleets/">SSH fleets</a>, <code>dstack</code> may add an additional alias
5216+
<code>&lt;run name&gt;-host</code> and use it as a proxy jump for <code>ssh &lt;run name&gt;</code>.</p>
5217+
</blockquote>
52145218
<p>While attached, connect to the run with:</p>
52155219
<div class="termy">
52165220
<div class="highlight"><pre><span></span><code>$<span class="w"> </span>ssh<span class="w"> </span><span class="p">&amp;</span>lt<span class="p">;</span>run<span class="w"> </span>name<span class="p">&amp;</span>gt<span class="p">;</span>

llms-full.txt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6658,8 +6658,8 @@ $ dstack apply -f .dstack.yml
66586658

66596659
!!! info "Attached by default"
66606660
For run configurations, `dstack apply` automatically attaches after
6661-
submitting the run. This streams logs, forwards declared ports, and
6662-
configures SSH access. See [Attach to runs](#attach-to-runs).
6661+
submitting the run. This configures SSH access, forwards declared ports, and
6662+
streams logs. See [Attach to runs](#attach-to-runs).
66636663

66646664
Use `-d` to submit in detached mode.
66656665

@@ -6681,24 +6681,26 @@ $ dstack attach &lt;run name&gt;
66816681
`dstack attach <run name>`, the CLI downloads the current user's built-in
66826682
private SSH key if needed and stores it under `~/.dstack/ssh/`.
66836683

6684-
While attached, the CLI updates `~/.dstack/ssh/config` with the run name as
6685-
an SSH host alias and ensures this file is included from `~/.ssh/config`:
6684+
While attached, the CLI updates `~/.dstack/ssh/config` and ensures this file
6685+
is included from `~/.ssh/config`. The file contains a `Host <run name>`
6686+
alias used by `ssh <run name>` to SSH into the run container:
66866687

66876688
<div editor-title="~/.dstack/ssh/config">
66886689

66896690
```ssh-config
6690-
Host &lt;run name&gt;
6691-
HostName localhost
6692-
Port &lt;local SSH port&gt;
6693-
User root
6694-
IdentityFile ~/.dstack/ssh/&lt;key&gt;
6691+
Host <run name>
6692+
HostName <host>
6693+
Port <ssh port>
6694+
User <user>
6695+
IdentityFile <private user SSH key>
66956696
IdentitiesOnly yes
66966697
```
66976698

66986699
</div>
66996700

6700-
For VM-based and SSH fleets, `dstack` may also configure the
6701-
`<run name>-host` alias for SSH access to the host.
6701+
> For [VM-based backends](../concepts/backends.md#vm-based) and
6702+
> [SSH fleets](../concepts/fleets.md), `dstack` may add an additional alias
6703+
> `<run name>-host` and use it as a proxy jump for `ssh <run name>`.
67026704

67036705
While attached, connect to the run with:
67046706

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)