MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / sandbox_ssh_proxy_by_name

Function sandbox_ssh_proxy_by_name

crates/openshell-cli/src/ssh.rs:1420–1429  ·  view source on GitHub ↗

Run the SSH proxy in "name mode": create a session on the fly, then proxy. This is equivalent to [`sandbox_ssh_proxy`] but accepts a cluster endpoint and sandbox name instead of pre-created gateway/token credentials. It is suitable for use as an SSH `ProxyCommand` in `~/.ssh/config` because it creates a fresh session on every invocation.

(server: &str, name: &str, tls: &TlsOptions)

Source from the content-addressed store, hash-verified

1418/// suitable for use as an SSH `ProxyCommand` in `~/.ssh/config` because it
1419/// creates a fresh session on every invocation.
1420pub async fn sandbox_ssh_proxy_by_name(server: &str, name: &str, tls: &TlsOptions) -> Result<()> {
1421 let session = ssh_session_config(server, name, tls).await?;
1422 sandbox_ssh_proxy(
1423 &session.gateway_url,
1424 &session.sandbox_id,
1425 &session.token,
1426 tls,
1427 )
1428 .await
1429}
1430
1431fn host_alias(name: &str) -> String {
1432 format!("openshell-{name}")

Callers 1

mainFunction · 0.85

Calls 2

ssh_session_configFunction · 0.85
sandbox_ssh_proxyFunction · 0.85

Tested by

no test coverage detected