Deploy via SSH

Register your public key once, then have your agent call enable_ssh on a VM. sshd installs, your key lands in authorized_keys, and the VM gets a stable public TCP endpoint.

For workflows built around rsync, appleboy/ssh-action, docker compose pull, or ansible, Superjolt exposes SSH on any VM with two steps: register your public key, call enable_ssh. sshd installs, your key lands in authorized_keys, and the VM gets a public TCP endpoint.

1. Register your SSH key (once)

Open the dashboardSettings → API keys → SSH keys → Add SSH key.

Paste the contents of ~/.ssh/id_ed25519.pub (the public key — single line, starts with ssh-ed25519). Never paste the private key (~/.ssh/id_ed25519, multi-line, starts with -----BEGIN).

The key is stored at tenant scope and auto-injected into every new VM that ships sshd (e.g. the vscode-1.96 template). Key registration is dashboard-only — there’s no agent tool for it.

2. Enable SSH on the VM

For VMs that don’t already ship sshd (every image except the vscode-* family), have your agent call:

enable ssh on vm-abc123

The agent calls enable_ssh. The platform:

  1. apt-get install openssh-server on the VM
  2. Writes your account keys to /root/.ssh/authorized_keys
  3. Appends sshd launch to /etc/rc.local so it survives reboot
  4. Starts sshd
  5. Opens public TCP :22

The response includes the public host + port:

SSH enabled on vm-abc123. Connect with: ssh [email protected] -p 30421

3. Use any SSH tool

The hostname and port are stable across stop/start, so you can plug them into anything.

GitHub Actions — appleboy/ssh-action

- uses: appleboy/ssh-action@v1
  with:
    host: vm-abc123.superjolt.host
    port: 30421
    username: root
    key: ${{ secrets.SSH_PRIVATE_KEY }}
    script: |
      cd /root/app && git pull && npm ci && pm2 reload all

rsync from your laptop

rsync -avz -e 'ssh -p 30421' ./dist/ [email protected]:/root/app/

Local config (so you can ssh vm-abc123)

Host vm-abc123
  HostName vm-abc123.superjolt.host
  Port 30421
  User root
  IdentityFile ~/.ssh/id_ed25519

Tradeoffs vs the GitHub Action

The GitHub Action is the paved path because it avoids the common SSH-in-CI footguns — private key in SSH_PRIVATE_KEY secret, host-key rotations, etc. Reach for SSH when you need:

  • A tool that doesn’t speak HTTP (rsync, scp, ansible)
  • Interactive debugging (ssh root@… from your terminal)
  • A pre-existing CI pipeline you don’t want to rewrite

Undo

To stop accepting SSH, close port 22 via your agent (or DELETE /v1/vms/:id/ports/22). sshd keeps running inside the VM but is no longer reachable from the public internet.

To rotate the key on a VM, remove the old key in Settings → SSH keys, add the new one, and run enable_ssh again to refresh authorized_keys. Existing VMs need the refresh — removing an account key does not retroactively scrub VMs.