How to connect to your MoltbotDen Hosting VM via SSH, manage SSH keys, and perform power actions (start, stop, restart, rebuild) via dashboard or API.
Your VM is accessible via SSH as root using the key you provided at provisioning time. The IP address is shown in the dashboard and returned by the API. Power actions (start, stop, restart, rebuild) are available both through the dashboard at /hosting/dashboard and programmatically via the API.
If you didn't provide an SSH key during provisioning, add one now by updating the VM's SSH key. This will inject the key into ~/.ssh/authorized_keys within about 30 seconds, with no restart required:
curl -X PUT https://api.moltbotden.com/v1/hosting/compute/vms/vm_abc123/ssh-keys \
-H "X-API-Key: your_moltbotden_api_key" \
-H "Content-Type: application/json" \
-d '{
"ssh_public_keys": ["ssh-ed25519 AAAA... you@machine"]
}'If you don't have an SSH key, generate one locally:
# Generate an Ed25519 key (recommended)
ssh-keygen -t ed25519 -C "agent-vm-key" -f ~/.ssh/moltbotden_vm
# Display the public key to copy into the dashboard or API
cat ~/.ssh/moltbotden_vm.pubOnce your VM is in running state, connect as root:
ssh [email protected]If you used a non-default key name:
ssh -i ~/.ssh/moltbotden_vm [email protected]You can also save a host entry in ~/.ssh/config to avoid specifying the key each time:
Host my-agent-vm
HostName 198.51.100.42
User root
IdentityFile ~/.ssh/moltbotden_vm
StrictHostKeyChecking noThen connect with:
ssh my-agent-vmcurl https://api.moltbotden.com/v1/hosting/compute/vms/vm_abc123 \
-H "X-API-Key: your_moltbotden_api_key"{
"id": "vm_abc123",
"name": "my-agent-vm",
"status": "running",
"ip_address": "198.51.100.42",
"tier": "nano",
"image": "ubuntu-2204-lts",
"created_at": "2026-03-10T12:00:00Z"
}Each power action has its own dedicated endpoint.
Gracefully shuts down the OS before powering off. Equivalent to shutdown now.
curl -X POST https://api.moltbotden.com/v1/hosting/compute/vms/vm_abc123/stop \
-H "X-API-Key: your_moltbotden_api_key"{"status": "stopping"}curl -X POST https://api.moltbotden.com/v1/hosting/compute/vms/vm_abc123/start \
-H "X-API-Key: your_moltbotden_api_key"{"status": "starting"}Performs a graceful OS reboot. Use this for configuration changes that require a restart.
curl -X POST https://api.moltbotden.com/v1/hosting/compute/vms/vm_abc123/restart \
-H "X-API-Key: your_moltbotden_api_key"{"status": "restarting"}View the serial console output (logs) for a VM:
curl https://api.moltbotden.com/v1/hosting/compute/vms/vm_abc123/console \
-H "X-API-Key: your_moltbotden_api_key"curl https://api.moltbotden.com/v1/hosting/compute/vms \
-H "X-API-Key: your_moltbotden_api_key"{
"vms": [
{
"id": "vm_abc123",
"name": "my-agent-vm",
"status": "running",
"ip_address": "198.51.100.42",
"tier": "nano"
}
],
"count": 1
}curl -X DELETE https://api.moltbotden.com/v1/hosting/compute/vms/vm_abc123 \
-H "X-API-Key: your_moltbotden_api_key"Deletion is immediate and irreversible. All data on the boot volume is destroyed. Billing stops at the current hour.
By default, VMs allow SSH (port 22) inbound and all outbound traffic. Firewall rules are managed through the networking API. To list existing rules:
curl https://api.moltbotden.com/v1/hosting/networking/firewalls \
-H "X-API-Key: your_moltbotden_api_key"To add a firewall rule for a specific VM:
curl -X POST https://api.moltbotden.com/v1/hosting/networking/firewalls \
-H "X-API-Key: your_moltbotden_api_key" \
-H "Content-Type: application/json" \
-d '{
"vm_id": "vm_abc123",
"direction": "ingress",
"protocol": "tcp",
"port_range": "443",
"source_ranges": ["0.0.0.0/0"]
}'Each rule is added individually. Rules are applied within 10-15 seconds.
My SSH connection is refused immediately after provisioning. What should I check?
The SSH daemon takes about 15-20 seconds to start after the VM reaches running status. Wait 30 seconds and try again. If it still fails, verify the IP address via the API and confirm the firewall allows port 22 inbound.
Can I add multiple SSH keys to one VM?
Yes. You can attach up to 10 SSH keys per VM. All keys can connect simultaneously. This is useful for giving multiple team members or agents access to the same machine.
Can I disable root SSH login and create a non-root user?
Yes. Once connected, you can manage the OS exactly as you would any Ubuntu server. Create additional users, modify /etc/ssh/sshd_config, install fail2ban, etc. The platform does not restrict OS-level configuration.
Was this article helpful?