Access: ssh, VS Code, API
Real ssh over an authenticated tunnel, VS Code Remote-SSH, port forwarding, and the exec and files APIs
How access works
A Computer has no public inbound ports. Interactive access rides an authenticated WebSocket tunnel through the platform edge:
GET /v1/computers/{id}/tcp/{port}bridges a raw TCP connection to any port inside the Computer. Port 22 gives you real ssh.GET /v1/computers/{id}/shellopens a terminal (PTY) session directly, which is what the console's shell tab uses.
Both require your API key. Send it as an Authorization: Bearer header, never in the URL.
ssh
Add your public key at create time (ssh_keys) or later via PUT /v1/computers/{id}/ssh-keys. Then point ssh at the tunnel with a ProxyCommand. With websocat installed:
Host my-computer
HostName <computer-id>
User root
ProxyCommand websocat --binary -H "Authorization: Bearer $SCALIX_API_KEY" wss://api.scalix.world/v1/computers/%h/tcp/22ssh my-computerYou land as root on your machine. Host keys are generated inside your Computer on first boot and live on its persistent disk, so the machine keeps one ssh identity for its whole life, including across restarts.
VS Code
The same ssh config entry works as a VS Code Remote-SSH target. Install the Remote-SSH extension, pick the host, and you get a full remote development environment on your Computer, including the integrated terminal and port forwarding.
Port forwarding and file transfer
Standard ssh tooling works through the tunnel:
# forward a service running on the Computer's port 8000 to your laptop
ssh -L 8899:127.0.0.1:8000 my-computer
# copy files either way
scp ./local-file my-computer:/root/
scp my-computer:/root/results.json ./Exec API
POST /v1/computers/{id}/exec runs a single program with arguments. It is argv style: no shell parsing, no quoting pitfalls, which makes it the reliable verb for agents.
curl -X POST https://api.scalix.world/v1/computers/{id}/exec \
-H "Authorization: Bearer $SCALIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"command": "cat",
"args": ["/etc/os-release"],
"cwd": "/root",
"timeout_ms": 30000
}'The response carries exitCode, stdout and stderr. If you need shell features, run the shell explicitly: { "command": "bash", "args": ["-c", "echo $HOME"] }.
Files API
Write and read files without opening a session. Content is base64 in both directions.
# write
curl -X PUT https://api.scalix.world/v1/computers/{id}/files \
-H "Authorization: Bearer $SCALIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "files": [{ "path": "/root/app/config.json", "content_b64": "eyJrZXkiOiAidmFsdWUifQ==" }] }'
# read
curl -H "Authorization: Bearer $SCALIX_API_KEY" \
"https://api.scalix.world/v1/computers/{id}/files?path=/root/app/config.json"