Skip to main content

Accessing Your Instance

This guide covers how to interact with your Vers VMs — connecting via SSH, executing commands, transferring files, and accessing network ports.

Connection Architecture

Vers uses SSH-over-TLS for all VM connections. This means your SSH traffic is tunneled through a TLS connection on port 443.
Your Machine                    Vers Infrastructure
    │                                   │
    │  TLS Connection (port 443)        │
    ├──────────────────────────────────►│ {vm-id}.vm.vers.sh
    │                                   │
    │  SSH Handshake (over TLS)         │
    ├──────────────────────────────────►│
    │                                   │
    │  Encrypted SSH Session            │
    │◄─────────────────────────────────►│ Your VM
Benefits:
  • Works through corporate firewalls (uses HTTPS port 443)
  • Double encryption (TLS + SSH)
  • No need to expose SSH ports
  • Automatic routing to your specific VM

Ways to Access Your VM

Vers provides three main ways to interact with VMs:
MethodCommandUse Case
Interactive Shellvers connectDevelopment, debugging, manual work
Execute Commandsvers executeAutomation, scripts, CI/CD
File Transfervers copyUpload/download files and directories

Interactive Shell (vers connect)

Open a full terminal session to your VM:
# Connect to current HEAD VM
vers connect

# Connect to specific VM
vers connect my-vm
Once connected, you have full root access:
root@vm-abc123:~# apt update
root@vm-abc123:~# npm install
root@vm-abc123:~# python app.py

Terminal Features

  • Full PTY support: Run vim, htop, or any interactive program
  • Terminal resizing: Window size changes are reflected in the VM
  • Color support: Full xterm-256color terminal
  • Multiple sessions: Connect from multiple terminals simultaneously

Exiting

Type exit or press Ctrl+D to disconnect. Your VM keeps running.

Executing Commands (vers execute)

Run commands without an interactive session:
# Basic command
vers execute my-vm "ls -la"

# Run a script
vers execute my-vm "python /app/test.py"

# Chain commands
vers execute my-vm "cd /app && npm test"
Output is captured and returned to your terminal. Exit codes are preserved.

File Transfer (vers copy)

Transfer files between your machine and VMs using SCP:
# Upload file to VM
vers copy ./local-file.txt my-vm:/remote/path/

# Download file from VM
vers copy my-vm:/remote/file.txt ./local-path/

# Upload directory (recursive)
vers copy -r ./local-dir/ my-vm:/remote/dir/

# Download directory (recursive)
vers copy -r my-vm:/remote/dir/ ./local-dir/

Networking and Ports

Your VM is accessible at:
https://<vm-id>.vm.vers.sh:<port>
Vers terminates TLS at the proxy — your VM serves plain HTTP, browsers see HTTPS. No cert setup needed.

Available Ports

Vers routes the following ports: 80, 443, 3000, 3210, 3306, 3724, 5173, 8000, 8080, 9000, 9999, 1337

Binding

If your server binds 0.0.0.0 (IPv4 only), bind dual-stack instead:
server.listen(3000, "::");

DNS

If you need outbound internet from inside the VM:
echo 'nameserver 8.8.8.8' > /etc/resolv.conf

SSH Key Management

Vers automatically manages SSH keys for you:
  1. First connection: CLI fetches your VM’s private key from the API
  2. Local caching: Key stored at /tmp/vers-ssh-keys/{vm-id}.key
  3. Secure permissions: Keys have 0600 permissions (owner read/write only)
  4. Automatic authentication: Key used for all subsequent connections
You never need to manually configure SSH keys.

Connection Details

Authentication

  • Username: Always root
  • Method: Public key authentication (no passwords)
  • Keys: Per-VM keys, automatically managed

Network

  • Host: {vm-id}.vm.vers.sh
  • Port: 443 (TLS)
  • Protocol: SSH tunneled over TLS

Keep-Alive

Connections use automatic keep-alive:
  • Interval: 10 seconds
  • Max missed: 6 (disconnects after ~60 seconds of no response)

Multiple VM Workflows

Parallel Development

# Terminal 1: Frontend development
vers connect frontend-vm
root@frontend:~# npm run dev

# Terminal 2: Backend development
vers connect backend-vm
root@backend:~# python manage.py runserver

# Terminal 3: Database work
vers connect db-vm
root@db:~# psql -U postgres

Troubleshooting

Connection Refused

Cause: VM may still be starting up. Solution: Wait a few seconds and retry.

VM Not Running

Error: VM is not running (current state: Paused)
Solution: Resume the VM with vers resume.

SSH Key Errors

Cause: Authentication issue. Solution: Run vers login to re-authenticate.

Timeout

Cause: Network issues or VM unavailable. Solution: Check your internet connection; verify VM exists with vers status.

See Also