SSH into any VM with account-level keys

add_ssh_key() registers your public key once. Every VM returns ssh_host, ssh_user, and ssh_port in the creation response. Connect directly, run commands, manage state — no SDK required after setup.

Account-level

Key scope

ssh_host + ssh_port

Per VM

add/list/delete

Key management

ssh workflows

$client.add_ssh_key('ssh-ed25519 AAAAC3...')

↳key registered | fingerprint: SHA256:x4f2...

$vm = client.vms.create(wait=True)

↳ssh_host: vm-abc123.instavm.io | ssh_port: 22

$ssh root@vm-abc123.instavm.io

↳connected | Linux 5.10 | python 3.11 | node 20

$pip install eval-harness && python eval.py

↳eval complete | results in /tmp/output.json

$

Capabilities

Account-level SSH keys

add_ssh_key(public_key) registers a key to your account. All VMs accept it. list_ssh_keys() and delete_ssh_key(key_id) for rotation.

Connection info in VM response

vms.create() returns ssh_host, ssh_user, and ssh_port. Connect with standard ssh -i ~/.ssh/id_rsa user@host -p port.

Full terminal access

Once connected, you have a full Linux shell. Install packages, run scripts, inspect state. Same VM as the API operates on.

Script-friendly

Combine with shell loops and cron. ssh user@host 'instavm vm snapshot ...' works. No SDK dependency for operational tasks.

SDK reference

ssh-instavm-dev.py
pythonKey setup
1from instavm import InstaVM
2
3client = InstaVM(api_key="sk_instavm_...")
4
5# Register SSH key (account-level, works on all VMs)
6client.add_ssh_key("ssh-ed25519 AAAAC3Nza... user@laptop")
7
8# Create VM and get SSH connection info
9vm = client.vms.create(wait=True)
10print(f"ssh {vm['ssh_user']}@{vm['ssh_host']} -p {vm['ssh_port']}")
11
12# List and manage keys
13keys = client.list_ssh_keys()
14# client.delete_ssh_key(key_id=keys[0]["id"])

How it works

Register key, create VM, connect

01

Register your SSH key

client.add_ssh_key('ssh-ed25519 AAAA...') adds your public key. It applies to all VMs on the account. Do this once.

02

Create a VM

vms.create() returns ssh_host, ssh_user, ssh_port. Or use the session-backed client — same VM, same SSH access.

03

Connect and work

ssh -i ~/.ssh/id_rsa user@host -p 22. Full shell access. Snapshot, clone, and manage from the terminal.

Get started with InstaVM

Free tier available; a card on file, no charge to get started. VMs provision in under 200ms.

We use cookies to improve your experience. See our cookie policy.