clouder ssh
SSH into a virtual machine by name. Automatically resolves the VM's public IP and selects the appropriate SSH key.
Commands
clouder ssh connect
Connect to a VM via SSH.
clouder ssh connect <vm-name> [OPTIONS]
| Argument | Description |
|---|---|
vm-name (required) | Name of the virtual machine to SSH into |
| Option | Short | Description |
|---|---|---|
--user | -u | SSH username (default: azureuser for Azure, ubuntu for OVH) |
--key | -i | SSH key name from ~/.ssh/ (overrides auto-detection) |
--port | -p | SSH port (default: 22) |
How it works:
- Looks up the VM by name in the current cloud context.
- Resolves the public IP address:
- Azure: Traverses VM → NIC → Public IP chain.
- OVH: Reads from the VM's
ipAddressesfield.
- Auto-detects the SSH key:
- First checks for
~/.ssh/<vm-name>-key(generated duringclouder vm create). - If not found, lists available keys and lets you pick.
- If only one key exists, uses it automatically.
- First checks for
- Connects with
StrictHostKeyChecking=accept-newfor first-time connections.
Example:
# Basic usage — auto-detects key and user
clouder ssh connect my-server
# Specify user and key
clouder ssh connect my-server --user ubuntu --key my-custom-key
# Custom port
clouder ssh connect my-server -p 2222
Workflow
# Create a VM (generates my-server-key SSH key pair)
clouder vm create my-server
# SSH in immediately
clouder ssh connect my-server
# Or with a downloaded key
clouder ssh-key download my-server --key /path/to/key.pem
clouder ssh connect my-server --key my-server
tip
When you create a VM with clouder vm create and choose "Generate new key pair", the key is named <vm-name>-key. The clouder ssh connect command automatically finds and uses this key.