Skip to content

Use sshproxy for CLI attach if enabled#3711

Open
un-def wants to merge 1 commit intomasterfrom
issue_3644_ssh_attach_via_sshproxy
Open

Use sshproxy for CLI attach if enabled#3711
un-def wants to merge 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
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.

1 participant