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)
| 1418 | /// suitable for use as an SSH `ProxyCommand` in `~/.ssh/config` because it |
| 1419 | /// creates a fresh session on every invocation. |
| 1420 | pub 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 | |
| 1431 | fn host_alias(name: &str) -> String { |
| 1432 | format!("openshell-{name}") |
no test coverage detected