Skip to main content

SSH Access

SSH keys let you connect directly to InstaVM VMs from your terminal. Add your public key once and SSH into any VM on your account.

Add an SSH key

# Add from default key
instavm ssh-key add

# Or specify the key directly
instavm ssh-key add "ssh-rsa AAAA... user@host"

List SSH keys

instavm ssh-key list

Delete an SSH key

instavm ssh-key remove 123

Generate an SSH key pair

If you do not have a key pair:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
cat ~/.ssh/id_rsa.pub

Connect to a VM

Create a VM and use the returned SSH connection details:

instavm create
instavm connect <vm_id>

Then from your terminal:

ssh -i ~/.ssh/id_rsa user@vm-host.example.com -p 22

Key management notes

  • Keys are bound to your account, not individual VMs.
  • All keys on your account work across all your VMs.
  • Delete unused keys regularly.
  • Never share private keys. Only upload the .pub file.

Error handling

# CLI exits with non-zero status and prints errors to stderr
instavm ssh-key add "invalid-key-format"
# Error: Invalid SSH public key format

Next steps