Skip to content

Use sshproxy for CLI attach if enabled#3711

Merged
un-def merged 1 commit intomasterfrom
issue_3644_ssh_attach_via_sshproxy
Apr 1, 2026
Merged

Use sshproxy for CLI attach if enabled#3711
un-def merged 1 commit intomasterfrom
issue_3644_ssh_attach_via_sshproxy

Conversation

@un-def
Copy link
Copy Markdown
Collaborator

@un-def un-def commented Mar 27, 2026

Run.attach() (used internally by dstack apply and dstack attach) now prefers sshproxy over direct backend-specific SSH access if the server reports that sshproxy is enabled via new JobConnectionInfo.sshproxy_* fields.

In addition, DSTACK_SERVER_SSHPROXY_ENFORCED disables direct SSH access to the instance/container by not including user's public key to the instance/container authorized_keys. Note, this setting renders dstack server incompatible with older clients.

Part-of: #3644

`Run.attach()` (used internally by `dstack apply` and `dstack attach`)
now prefers sshproxy over direct backend-specific SSH access if
the server reports that sshproxy is enabled via new
`JobConnectionInfo.sshproxy_*` fields.

In addition, `DSTACK_SERVER_SSHPROXY_ENFORCED` disables
direct SSH access to the instance/container by not including
user's public key to the instance/container `authorized_keys`.
Note, this setting renders dstack server incompatible with
older clients.

Part-of: #3644
@un-def un-def merged commit 8cd53b1 into master Apr 1, 2026
28 checks passed
@un-def un-def deleted the issue_3644_ssh_attach_via_sshproxy branch April 1, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants