# kosa8 cloud ssh

SSH into a cloud sandbox over its terminal, with no port 22 open

## Usage

```
kosa8 cloud ssh ID [-- SSH_ARGS...]
```

Runs this machine's ssh against the sandbox, carried over the sandbox's
authenticated terminal WebSocket: nothing listens on port 22 anywhere. sshd runs in
the terminal's container (installed on demand if the image has none) and lets in
kosa8's own key (~/.kosa8/ssh/id_ed25519, made on first use). Arguments after --
go to ssh: options such as -L 8080:localhost:8080, or a command to run.

--stdio ID is the ProxyCommand form: it speaks SSH on stdin and stdout, for
~/.ssh/config (see kosa8 cloud ssh-config) and VS Code Remote-SSH. Without an ssh
client on this machine, kosa8 cloud ssh opens the plain terminal instead.

## Flags

| Flag | Type | What it does | Default |
|---|---|---|---|
| `--stdio` | bool | speak SSH on stdin/stdout (a ProxyCommand for ssh and VS Code) |  |

## Example

```
  kosa8 cloud ssh sbx_abc
  kosa8 cloud ssh sbx_abc -- -L 3000:localhost:3000
  scp -o ProxyCommand='kosa8 cloud ssh --stdio sbx_abc' file root@kosa8-sbx_abc:/workspace/
```

---
Source: https://docs.kosa8.com/reference/cloud-ssh/
