Log in to a VM from your laptop with ssh, scp and rsync. Your VM accepts the public keys of your organization, and password login is off.
Add an SSH key
Section titled “Add an SSH key”A key is one public key line from a .pub file, and it belongs to the organization, not a project. Ed25519 and ECDSA keys, their security-key forms, and RSA keys of at least 2048 bits are accepted. The name is optional; without one, the key’s comment is the name, else its type.
- Open SSH keys.
- Select Add SSH key.
- Paste the contents of a
.pubfile, such as~/.ssh/id_ed25519.pub, into Public key. - Enter
laptopin Name. - Select Add SSH key. The dashboard says
SSH key added.
si org ssh-key add ~/.ssh/id_ed25519.pub --name laptopadded laptop SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFUcurl -sS -X POST "https://api.slashinfra.com/ssh-keys" \ -H "Authorization: Bearer $SI_API_KEY" -H "Content-Type: application/json" \ -d "{\"public_key\":\"$(cat ~/.ssh/id_ed25519.pub)\",\"name\":\"laptop\"}"API reference: Control API operation
{"id":"k5x2m8q1z0","name":"laptop","type":"ssh-ed25519","fingerprint":"SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU","public_key":"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl","added_by":"ada@example.com","created_ms":1795960241240}import os, requests
with open(os.path.expanduser("~/.ssh/id_ed25519.pub")) as f: public_key = f.read().strip()
res = requests.post( "https://api.slashinfra.com/ssh-keys", headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"}, json={"public_key": public_key, "name": "laptop"},)res.raise_for_status()print(res.json()["id"])k5x2m8q1z0import { readFileSync } from 'node:fs'
const publicKey = readFileSync(`${process.env.HOME}/.ssh/id_ed25519.pub`, 'utf8').trim()const res = await fetch('https://api.slashinfra.com/ssh-keys', { method: 'POST', headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ public_key: publicKey, name: 'laptop' }),})if (!res.ok) throw new Error(await res.text())const key = (await res.json()) as { id: string }console.log(key.id)k5x2m8q1z0A new VM gets every key of the organization at its first start. The guest writes them once to ~/.ssh/authorized_keys. After that the file is the VM’s; the API and the node do not change it again. A VM that started before you added the key gets nothing, so append the line on that VM:
OLD_VM=7a2b3c4d5esi exec $OLD_VM -c 'mkdir -p -m 700 ~/.ssh && cat >> ~/.ssh/authorized_keys >/dev/null && echo appended' < ~/.ssh/id_ed25519.pubappendedList SSH keys
Section titled “List SSH keys”List returns every key of the organization, oldest first. Each key has a name, type, fingerprint, who added it and when. The API returns [] when the organization has no keys.
- Open SSH keys.
- The table lists every key with Name, Fingerprint and Added. The type and who added it appear under the name.
si org ssh-key lsname type fingerprint added by addedlaptop ssh-ed25519 SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU ada@example.com 2026-11-29 13:51:00Zcurl -sS "https://api.slashinfra.com/ssh-keys" \ -H "Authorization: Bearer $SI_API_KEY"API reference: Control API operation
[{"id":"k5x2m8q1z0","name":"laptop","type":"ssh-ed25519","fingerprint":"SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU","public_key":"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl","added_by":"ada@example.com","created_ms":1795960241240}]import os, requests
res = requests.get( "https://api.slashinfra.com/ssh-keys", headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"},)res.raise_for_status()for key in res.json(): print(key["id"], key["name"], key["type"])k5x2m8q1z0 laptop ssh-ed25519const res = await fetch('https://api.slashinfra.com/ssh-keys', { headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}` },})if (!res.ok) throw new Error(await res.text())const keys = (await res.json()) as { id: string; name: string; type: string }[]for (const key of keys) console.log(key.id, key.name, key.type)k5x2m8q1z0 laptop ssh-ed25519Connect to a VM
Section titled “Connect to a VM”Port 22 is served by the default image; a VM of the postgres image has no SSH server. A stopped VM starts on its first connection.
- Open SVMs and select your VM.
- Select Overview.
- Under SSH, copy the Forward the port command and run it in a terminal on your laptop. Keep that terminal open.
- Copy the Connect command and run it in a second terminal.
With devbox, the commands are si port forward devbox 22:2222 and ssh -p 2222 user@127.0.0.1.
Create devbox with the default image:
si create --name devbox6f1c0f0e8aSet VM to the id in the answer, then add this block to ~/.ssh/config once. It sends every *.slashinfra.dev host through si port forward --stdio:
Host *.slashinfra.dev User user ProxyCommand si port forward --stdio %h 22Log in as your VM’s user, user:
VM=6f1c0f0e8assh user@$VM.slashinfra.dev whoamiuserAn open SSH session keeps the VM awake, so close it when you are done. scp and rsync work with the same host name.
Delete an SSH key
Section titled “Delete an SSH key”Delete stops new VMs from getting the key. Existing VMs that have it keep it in their own ~/.ssh/authorized_keys, so remove the line there as well. The API names the key by its id; si org ssh-key rm also takes its fingerprint or name. devbox keeps it until you delete the VM.
- Open SSH keys.
- Select More actions on
laptop. - Select Delete. The dashboard removes the key after five seconds; select Undo to keep it.
si org ssh-key rm laptopdeleted laptopcurl -sS -i -X DELETE "https://api.slashinfra.com/ssh-keys/k5x2m8q1z0" \ -H "Authorization: Bearer $SI_API_KEY"API reference: Control API operation
HTTP/2 204...import os, requests
res = requests.delete( "https://api.slashinfra.com/ssh-keys/k5x2m8q1z0", headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"},)res.raise_for_status()print(res.status_code)204const res = await fetch('https://api.slashinfra.com/ssh-keys/k5x2m8q1z0', { method: 'DELETE', headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}` },})if (!res.ok) throw new Error(await res.text())console.log(res.status)204si rm devboxdeleted 6f1c0f0e8aOptions
Section titled “Options”| Field | Type | Default | Allowed values | What it changes |
|---|---|---|---|---|
public_key |
string | Required | One <type> <base64> [comment] line; Ed25519, ECDSA, their security-key forms, or RSA of at least 2048 bits |
The key that new VMs accept. |
name (--name) |
string | The key comment, else its type | 1 to 100 characters, no line break | The name that lists show and si org ssh-key rm accepts. |
id (path, <KEY> in the CLI) |
string | Required | A key id from the list; the CLI also takes its SHA256: fingerprint or name |
The key that delete removes. |
Scroll horizontally to see all columns.
Errors
Section titled “Errors”| Code | When | Fix |
|---|---|---|
invalid_ssh_key |
Add sends text that is not one public key line. | Send one line from a .pub file. |
private_key |
Add sends the private half of a key. | Send the .pub file, and replace the private key if you shared it. |
unsupported_key_type |
Add sends DSA or another unsupported type. | Use Ed25519, ECDSA, a security key, or RSA of at least 2048 bits. |
rsa_key_too_short |
Add sends an RSA key below 2048 bits. | Create an Ed25519 key, or an RSA key of at least 2048 bits. |
invalid_name |
Add sends a name with a line break. | Send the name on one line. |
key_exists |
Add sends a key the organization already has. | Use the existing key, or delete it first. |
ssh_key_limit |
Add would make the 51st key. | Delete a key, or ask about your plan. |
ssh_key_not_found |
Delete names no key of the organization. | List the keys and use the id. |
not_supported_by_image |
A port 22 request names a VM of an image without SSH, such as postgres. |
Use a VM of the default image. |
Scroll horizontally to see all columns.
Errors that any request can return are in the error catalog.
Permissions
Section titled “Permissions”| Operation | Who can | Key action |
|---|---|---|
| Add an SSH key | Any member | svm:write |
| List SSH keys | Any member | svm:read |
| Delete an SSH key | Any member | svm:write |
| Connect to a VM | Any member | None |
Scroll horizontally to see all columns.
Limits
Section titled “Limits”- An organization holds 50 keys. The 51st add answers 409
ssh_key_limit. - A key name has 1 to 100 characters and no line break.
- Ed25519 and ECDSA keys, their security-key forms, and RSA keys of at least 2048 bits are accepted. DSA is not.
- Port 22 is served by the default image only. A VM of the
postgresimage has no SSH server. - A VM gets the organization’s keys once, at its first start. A key added later adds no line to an existing VM.
- Deleting a key leaves one line in the
authorized_keysof every VM that already has it; remove it there as well.
The full list is in Limits.
- VMs: create, start and delete the VM you log in to.
- Private network: reach a VM by name from your other VMs and your tailnet.
- Sleep and wake: keep a VM reachable with the
onpolicy.