@sealant/ssh-gateway
@sealant/ssh-gateway
Purpose
@sealant/ssh-gateway is the SSH routing gateway for sandbox access.
It gives users a single SSH entrypoint and resolves the active internal sandbox runtime target via the API.
What it solves
- stable SSH gateway host instead of one exposed port per sandbox
- reduced port-collision risk
- central location for auth/policy controls over sandbox SSH access
High-level flow
- User connects as
<prefix>-<sandboxId>@<gateway-host>. - Gateway authenticates the user key.
- Gateway asks API
GET /v1/sandboxes/{sandboxId}/ssh-targetfor the runtime endpoint. - Gateway opens upstream SSH and forwards session channels.
Key files
apps/ssh-gateway/src/gateway-server.tsapps/ssh-gateway/src/sandbox-target.tsapps/ssh-gateway/src/authorized-keys.tsapps/ssh-gateway/src/env.ts
Environment highlights
Env contract includes:
- gateway bind host/port/banner and key files
- API base URL + required internal token for
ssh-targetlookups - upstream private key + readiness timeout
- strict-host-key-checking toggle for upstream SSH
See apps/ssh-gateway/src/env.ts for complete details.
Runtime scripts
pnpm --filter @sealant/ssh-gateway devpnpm --filter @sealant/ssh-gateway testpnpm --filter @sealant/ssh-gateway typecheck