Synopsis
Description
Thessh command opens an interactive SSH session to an existing VM. If the VM is stopped or newly created, SmolVM automatically starts it and waits for SSH readiness before connecting.
Arguments
The identifier of the VM to connect to. This is the name you provided when creating the VM with
smolvm create.Options
SSH private key path for authentication.
SSH user to connect as.
Seconds to wait for VM boot and SSH readiness if the VM needs to be started.
Examples
Connect to a running VM
Connect with a custom SSH key
Connect as a different user
Allow more time for boot
If a VM is stopped and needs to restart, increase the timeout:Auto-start behavior
Thessh command handles VMs in different states:
| VM state | Behavior |
|---|---|
| Running | Connects immediately |
| Created | Starts the VM, waits for SSH readiness, connects |
| Stopped | Starts the VM, waits for SSH readiness, connects |
| Error | Prints an error and exits (recreate the VM) |
Exit codes
| Code | Description |
|---|---|
0 | SSH session ended normally |
1 | Error - connection failed, VM in error state, or SSH binary not found |
Related commands
smolvm create- Create a new VM to connect tosmolvm list- See available VMs and their statussmolvm env- Set environment variables before connecting