Skip to content

[UI] IDE/SSH access via SSH Proxy #3768

@un-def

Description

@un-def

Currently, the only option to connect to the job offered by UI is the dstack attach flow:

Image Image

When SSH proxy is enabled, it's possible to connect to the job directly, without dstack installed, but this flow is not exposed via UI.

All required information is available in the /api/project/:project/runs/get API method response, namely the jobs[].job_connection_info fields – ide_name, proxied_ide_url, proxied_ssh_command:

{
	"job_connection_info": {
		"ide_name": "VS Code",
		"attached_ide_url": "vscode://vscode-remote/ssh-remote+dev-environment/dstack/run",
		"proxied_ide_url": "vscode://vscode-remote/ssh-remote+bc7f75a4b92d4d34a0635b7e72a5b271@localhost:30022/dstack/run",
		"attached_ssh_command": [
			"ssh",
			"dev-environment"
		],
		"proxied_ssh_command": [
			"ssh",
			"bc7f75a4b92d4d34a0635b7e72a5b271@localhost",
			"-p",
			"30022"
		],
		"sshproxy_hostname": "localhost",
		"sshproxy_port": 30022,
		"sshproxy_upstream_id": "bc7f75a4b92d4d34a0635b7e72a5b271"
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions