Terminal API (WebSocket)¶
SSH to Saved Server¶
The client sends an initial JSON message with terminal size:
After that, the WebSocket carries raw terminal I/O:
- Client -> Server: keystrokes (text frames)
- Server -> Client: terminal output (text frames)
Resize¶
Send a JSON message at any time:
Quick Connect¶
First message includes connection details:
First message
{
"host": "10.0.1.50",
"port": 22,
"username": "deploy",
"password": "secret",
"cols": 80,
"rows": 24
}
Error Handling¶
If SSH connection fails, the server sends:
Then closes the WebSocket with code 1011.
Authentication¶
WebSocket authentication uses a JWT token in the query string. If invalid, the connection closes with code 4001.