@@ -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 "> ¶</ 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 <run name></ code > , the CLI downloads the current user's built-in
52005200private 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 <run name></ code >
5203+ alias used by < code > ssh <run name></ code > to SSH into the run container:</ p >
52035204< div editor-title ="~/.dstack/ssh/config ">
5204- < div class ="highlight "> < pre > < span > </ span > < code > Host & lt;run name& gt;
5205- HostName localhost
5206- Port & lt;local SSH port& gt;
5207- User root
5208- IdentityFile ~/.dstack/ssh/& lt;key& gt;
5205+ < div class ="highlight "> < pre > < span > </ span > < code > Host <run name>
5206+ HostName <host>
5207+ Port <ssh port>
5208+ User <user>
5209+ IdentityFile & lt;private user SSH key>
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 > <run name>-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 > <run name>-host</ code > and use it as a proxy jump for < code > ssh <run name></ 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 "> &</ span > lt< span class ="p "> ;</ span > run< span class ="w "> </ span > name< span class ="p "> &</ span > gt< span class ="p "> ;</ span >
0 commit comments