Virtual machines
Connect over SSH
Connect to a flockvm VM with the SSH command from its page, as user or root, set up ~/.ssh/config, copy files, forward ports and use VS Code Remote-SSH.
SSH is how you reach a VM: a shell, file copies, port forwarding and editors all go through it. Each VM has its own port on the host in France, forwarded to the VM's port 22.
Connect
Open the VM in the dashboard and copy the command from the Connect block.
-p 22001is the VM's own port, between 22001 and 22990. It stays the same for the VM's whole life, through pause, resume, stop and start.HOSTis the host of the VM's region, as written on the VM page.useris the user on the Agent image. On the Minimal image, it isroot, and the command readsssh -p 22001 root@HOST. Logins are by key only: passwords and keyboard-interactive logins are off.
The page also says where the port goes, for example "Port 22001 on HOST goes to 172.16.0.2:22. Log in as user with the key you gave at creation."
| Image | SSH user | Home | Root access |
|---|---|---|---|
Agent (ubuntu-26.04-agent) |
user |
/home/user |
sudo, without a password; logging in as root with the same key works too |
Minimal (ubuntu-26.04) |
root |
/root |
You are root |
A VM created before 2026-11-01 on Ubuntu 24.04 (ubuntu-24.04-agent or ubuntu-24.04) keeps the same login: user on the old Agent image, root on the old Minimal. See Images.
The examples below use user@HOST and /home/user. On a Minimal VM, write root@HOST and /root.
The command works only while the VM is running. A paused VM's page says "Paused. Resume it and the same command works, with the same processes." See Lifecycle.
If your key is not the default ~/.ssh/id_ed25519, name it:
Add the VM to ~/.ssh/config
An entry saves you typing the port, the user and the key. Use the host and port from the VM page, and User root for a Minimal VM.
Host agent
HostName HOST
Port 22001
User user
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
ServerAliveInterval 30
ServerAliveCountMax 4Then:
ssh, scp, rsync, git and editors all read this file, so every command below works with the alias.
Several VMs
Add one Host block per VM, each with its own Port. Shared settings can go in a Host * block at the end, or in a block that matches all of them, such as Host agent-*.
Copy files
scp takes the port with a capital -P. rsync takes it through -e.
# Upload a file
scp -P 22001 ./notes.md user@HOST:/home/user/
# Download a folder
scp -P 22001 -r user@HOST:/home/user/app/dist ./dist# Sync a project, skipping node_modules
rsync -az --delete --exclude node_modules \
-e "ssh -p 22001" ./my-app/ user@HOST:/home/user/my-app/scp ./notes.md agent:/home/user/
rsync -az -e ssh ./my-app/ agent:/home/user/my-app/rsync is installed in both images, so both ends have it.
Clone a private repository
The VM has outbound internet access, so git clone over HTTPS works with a token. Over SSH, add a deploy key to the VM, or use agent forwarding (below) with care.
Forward a port
A VM has no public HTTP port: only SSH comes in. To open a dev server running in the VM, forward its port to your machine with -L.
Open http://localhost:3000 in your browser. -N keeps the connection open without a shell. Forward several ports by repeating -L.
In ~/.ssh/config:
Host agent
# …
LocalForward 3000 localhost:3000
LocalForward 5173 localhost:5173To show the server to someone else, see Networking.
VS Code and Cursor
Remote-SSH in VS Code and Cursor reads ~/.ssh/config.
Add the config entry
Add the
Host agentblock above to~/.ssh/config.Connect
Open the command palette (⌘⇧P or Ctrl+Shift+P), run Remote-SSH: Connect to Host… and pick
agent.Open a folder
The editor installs its server in the VM on first connection, then opens your home folder (
/home/useror/root) or the folder you pick.
The editor server lives on the VM's disk, so it is still there after a stop and start. Its memory counts in the VM's RAM: on a small VM (4 GB), keep an eye on the Memory tile of the VM page.
Keep sessions alive
The VM's sshd sends a keepalive every 30 seconds (ClientAliveInterval 30). Add ServerAliveInterval on your side too, so idle sessions survive NAT and Wi-Fi changes:
Host *
ServerAliveInterval 30
ServerAliveCountMax 4A dropped connection still kills the shell's processes. Run long jobs and agents in tmux, which is installed in both images:
See Long-running sessions with tmux.
Pause keeps your session
When you pause a VM, open SSH connections stall. After Resume, the VM has the same processes, address and port, and a connection that did not time out meanwhile carries on.
Agent forwarding
ssh -A lets the VM use the keys of your local SSH agent, for example to git push over SSH.
Forward your agent only to VMs you trust
While you are connected, anything running as your user or as root in the VM, a coding agent included, can ask your local agent to sign with your keys. Prefer a deploy key or a fine-grained token scoped to one repository for agents.
Host key changes
Each VM generates its own SSH host keys (ed25519 and ecdsa) on its first boot. They stay the same through pause, resume, stop and start.
When you delete a VM and create a new one, the new VM has new host keys. flockvm does not hand a deleted VM's port to the next VM right away, but ports are reused eventually. When a new VM gets a port you used before, SSH refuses to connect:
If you deleted the old VM yourself, remove its entry and connect again:
For short-lived VMs you create and delete often, accept new host keys automatically but still refuse changed ones:
Host agent-*
StrictHostKeyChecking accept-newDon't set StrictHostKeyChecking no for VMs you keep. A host key that changes on a VM you did not delete is worth a look.
Troubleshooting
Permission denied (publickey)
The key you offer is not the one given at creation. Pass the private key that matches the key you picked in the New VM form with -i, and compare fingerprints with ssh-keygen -lf ~/.ssh/id_ed25519.pub against the one listed in your account settings. Keys you add to your account later don't reach existing VMs: see SSH keys.
After repeated failed logins from your address, the VM's SSH server (OpenSSH 10, on the Ubuntu 26.04 images) closes new connections from that address for a while, from a few seconds up to 10 minutes. Fix the key, wait, then connect again.
Connection refused or timeout
The VM is not running. Check its status on the VM page: start or resume it, then connect again.
The VM rebooted and now it's stopped
A reboot or poweroff inside the VM stops it. Click Start on the VM page. See Lifecycle.
More in Troubleshooting.
Next steps
Generate, save and add keys.
What goes in and out of a VM.
Keep agents running after you disconnect.