Skip to content

Connecting to a server

Host machines never expose ports to the internet. Every connection goes through the Gysga gateway, which reaches your container through an encrypted tunnel opened by the host.

Terminal window
ssh -p 2222 <server-id>@ssh.gysga.com
  • The user name is the server id (for example i-abc12345), shown in My servers.
  • You authenticate with any SSH key added in Settings → SSH keys (ed25519, ECDSA, RSA ≥ 2048 bits). Passwords are not supported.
  • It works with any image, even without sshd inside: the gateway starts your shell with docker exec. You land in /workspace with bash (or sh if the image has no bash).
  • One-off commands work too: ssh -p 2222 [email protected] nvidia-smi.

Add a shortcut to ~/.ssh/config:

Host my-gpu
HostName ssh.gysga.com
Port 2222
User i-abc12345
IdentityFile ~/.ssh/id_ed25519

Then just ssh my-gpu. This also makes VS Code / Cursor Remote-SSH work (the editor installs its server into the container; the image needs bash, tar and curl or wget).

On the first connection ssh asks you to confirm the gateway’s host key. Compare the fingerprint with the one shown in the connection panel of the dashboard (SHA256:...). If it ever changes unexpectedly, do not continue.

Jupyter, ComfyUI, Open WebUI and other web apps listen on a port inside the container. Forward it to your computer:

Terminal window
ssh -p 2222 -N -L 8188:localhost:8188 [email protected]

and open http://localhost:8188. You can forward several ports at once (-L 8888:localhost:8888 -L 6006:localhost:6006). The connection panel shows the right command for each port of your template.

  • Only ports inside your container can be forwarded (localhost/127.0.0.1 as the target).
  • Remote forwarding (-R) and agent forwarding are not supported.

Templates with Jupyter use the GYSGA_TOKEN environment variable as the login token. The connection panel shows it, or run echo $GYSGA_TOKEN in the server.

  • SFTP / scp work when the image has an sftp-server binary (most Ubuntu/Debian-based images do). If not, install it: apt-get update && apt-get install -y openssh-sftp-server.
    Terminal window
    scp -P 2222 data.zip [email protected]:/workspace/
    sftp -P 2222 [email protected]
  • rsync works when rsync is installed in the image:
    Terminal window
    rsync -avP -e "ssh -p 2222" ./dataset/ [email protected]:/workspace/dataset/

Model servers (vLLM, SGLang, Ollama, embeddings, audio) can be called directly over HTTPS with an API key, without SSH:

https://api.gysga.com/v1/instances/<server-id>/proxy/<port>/<path>

See API → Proxy.

Message What to do
Permission denied (publickey) Check the user name is the server id and your key is added in the dashboard.
no such instance for this key The server was destroyed, or it belongs to another account.
the host machine is offline, try again later The host lost its connection. Billing is paused; wait or create a new server.
instance is not running Start the server first.
nothing is listening on port N The app inside hasn’t started yet (models can take minutes to load). Check the logs from a shell.