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.
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
$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
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.
vms.create() returns ssh_host, ssh_user, and ssh_port. Connect with standard ssh -i ~/.ssh/id_rsa user@host -p port.
Once connected, you have a full Linux shell. Install packages, run scripts, inspect state. Same VM as the API operates on.
Combine with shell loops and cron. ssh user@host 'instavm vm snapshot ...' works. No SDK dependency for operational tasks.
SDK reference
1from instavm import InstaVM23client = InstaVM(api_key="sk_instavm_...")45# Register SSH key (account-level, works on all VMs)6client.add_ssh_key("ssh-ed25519 AAAAC3Nza... user@laptop")78# Create VM and get SSH connection info9vm = client.vms.create(wait=True)10print(f"ssh {vm['ssh_user']}@{vm['ssh_host']} -p {vm['ssh_port']}")1112# List and manage keys13keys = client.list_ssh_keys()14# client.delete_ssh_key(key_id=keys[0]["id"])
How it works
client.add_ssh_key('ssh-ed25519 AAAA...') adds your public key. It applies to all VMs on the account. Do this once.
vms.create() returns ssh_host, ssh_user, ssh_port. Or use the session-backed client — same VM, same SSH access.
ssh -i ~/.ssh/id_rsa user@host -p 22. Full shell access. Snapshot, clone, and manage from the terminal.
Free tier available. No credit card required. VMs provision in under 200ms.
By clicking Accept, you agree to our use of cookies.
Learn more