Get SSH details for a Box
Returns what the caller needs to SSH into the Box: their guest account (the SSH user), the Box's SSH host key and the alias to pin it under, and whether the caller can connect now. Any active member of the Box's organization may read it with a sign-in session; granted says whether the caller holds a grant. API keys cannot use this route.
SSH goes over Cubicle's private network to port 22 on the Box, with the caller's registered SSH key. hostKey is null until the Box has published a host key for its current connectionGeneration; trust only the key returned here. When ready is false, reason names the first unmet condition.
cubicle ssh-config reads this route and writes an SSH configuration that pins the host key. See SSH and host-key pinning and SSH into a Box.
sessionAuthorizationBearer <token>A sign-in session token (jvs_…) from the Dashboard, cubicle login or the device authorization flow.
box*stringThe Box's ID, ORG/NAME with the slash encoded as %2F, or a bare NAME, which ?org= narrows. See Box references.
org?stringThe organization's ID or name, to narrow a bare NAME in {box}. Ignored for an ID or ORG/NAME.
The caller's SSH details for the Box.
application/json- response
boxId*stringThe Box's ID.
granted*booleanWhether the caller holds an active grant on the Box.
guestAccount*|The caller's Unix account in the Box, which is the SSH user name; null if the caller was never granted the Box.
hostKeyAlias*stringThe name to pin the host key under, as SSH's HostKeyAlias: jevbox- followed by the Box ID.
hostKey*|The Box's SSH host public key, only when it was published for the current connectionGeneration; otherwise null.
connectionGeneration*numberThe Box's current connection generation. The host key and the caller's account are valid only for it.
ready*booleanWhether the caller can SSH into the Box now.
reason*|The first unmet condition, when ready is false: one of the Box's ssh.reason values, or user_disabled, membership_inactive, grant_inactive, no_active_key (no SSH key registered) or authorization_pending (the Box has not applied the caller's latest account change).
curl -X GET 'https://api.cubicle.sh/v1/boxes/acme%2Fjob-1/ssh'{ "boxId": "0f6c2a5e-3b1d-4c8e-9a7f-2d4e6b8c1a3f", "granted": true, "guestAccount": "jv_2c4e6a8b0d1f", "hostKeyAlias": "jevbox-0f6c2a5e-3b1d-4c8e-9a7f-2d4e6b8c1a3f", "hostKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK5mFq0dXx3TQ2vC9yH8rLwP4jN7sBzE1aG6uM2kR0tY", "connectionGeneration": 1, "ready": true, "reason": null}
