Print an SSH config `Host` block for a sandbox to stdout. The output is suitable for appending to `~/.ssh/config` so that tools like `VSCode` Remote-SSH can connect to the sandbox by host alias. The `ProxyCommand` uses `--gateway-name` so that `ssh-proxy` resolves the gateway endpoint and TLS certificates from the gateway metadata directory (`~/.config/openshell/gateways/ /mtls/`).
(gateway: &str, name: &str)
| 1625 | /// gateway endpoint and TLS certificates from the gateway metadata directory |
| 1626 | /// (`~/.config/openshell/gateways/<name>/mtls/`). |
| 1627 | pub fn print_ssh_config(gateway: &str, name: &str) { |
| 1628 | print!("{}", render_ssh_config(gateway, name)); |
| 1629 | } |
| 1630 | |
| 1631 | #[cfg(test)] |
| 1632 | mod tests { |