SSH Access
Connect to your AgentOS Cloud VM via SSH for terminal access.
SSH gives you direct terminal access to your AgentOS Cloud VM. Use it for setup, troubleshooting, or when you prefer working in your local terminal.
Quick Connect
Copy the SSH command from your dashboard:
ssh dev@{your-subdomain}.vm.runagentos.com
Replace {your-subdomain} with your actual machine ID (shown in your dashboard).
First-Time Setup
1. Add Your SSH Key
Before you can connect, add your public key to AgentOS Cloud:
Find your existing key:
# macOS/Linux
cat ~/.ssh/id_ed25519.pub
# Windows PowerShell
Get-Content ~/.ssh/id_ed25519.pub
Or generate a new one:
ssh-keygen -t ed25519 -C "your-email@example.com"
2. Add to Dashboard
- Go to your dashboard
- Find the SSH Keys panel
- Click Add
- Paste your public key
- Give it a name (e.g., "MacBook", "Work Laptop")
3. Launch Your VM
After adding your key and subscribing, click Launch environment. Your key is automatically injected during provisioning.
SSH Configuration
For convenience, add this to ~/.ssh/config:
Host agentos
HostName {your-subdomain}.vm.runagentos.com
User dev
IdentityFile ~/.ssh/id_ed25519
Then connect with just:
ssh agentos
Port Forwarding
Access services running on your VM locally:
Forward a Single Port
# Forward VM port 3000 to localhost:3000
ssh -L 3000:localhost:3000 dev@{subdomain}.vm.runagentos.com
Multiple Ports
ssh -L 3000:localhost:3000 -L 5432:localhost:5432 dev@{subdomain}.vm.runagentos.com
Common Use Cases
| Service | Command |
|---|---|
| Dev server | -L 3000:localhost:3000 |
| PostgreSQL | -L 5432:localhost:5432 |
| Redis | -L 6379:localhost:6379 |
| Vite HMR | -L 5173:localhost:5173 |
IDE Integration
VS Code Remote SSH
- Install the Remote - SSH extension
- Open Command Palette → "Remote-SSH: Connect to Host"
- Enter:
dev@{subdomain}.vm.runagentos.com - VS Code opens with full remote editing capabilities
Cursor
- Use the built-in remote SSH feature
- Connect to
dev@{subdomain}.vm.runagentos.com - Open your project folder
JetBrains Gateway
- Open JetBrains Gateway
- Choose "SSH Connection"
- Add your VM as a new target
- Select your IDE and project
File Transfer
Copy Files To VM
# Single file
scp local-file.txt dev@{subdomain}.vm.runagentos.com:~/projects/
# Directory
scp -r my-project/ dev@{subdomain}.vm.runagentos.com:~/projects/
Copy Files From VM
scp dev@{subdomain}.vm.runagentos.com:~/projects/output.txt ./
Using rsync
For larger transfers with resume support:
rsync -avz --progress my-project/ dev@{subdomain}.vm.runagentos.com:~/projects/my-project/
Multiple SSH Keys
You can add multiple SSH keys to your account—useful if you use different machines:
- Go to dashboard → SSH Keys
- Click Add for each key
- Name them descriptively (e.g., "MacBook Pro", "Work Desktop", "iPad")
All keys are injected when you provision a new VM.
Troubleshooting
Connection Refused
# Check if VM is running
# Dashboard should show "running" status
# Test connectivity
ssh -v dev@{subdomain}.vm.runagentos.com
The -v flag shows verbose output to help diagnose issues.
Permission Denied
- Verify your SSH key is added to the dashboard
- Check the fingerprint matches your local key:
ssh-keygen -lf ~/.ssh/id_ed25519.pub - Ensure you're using the correct key:
ssh -i ~/.ssh/id_ed25519 dev@{subdomain}.vm.runagentos.com
Host Key Changed
If you destroy and re-provision your VM, the host key changes:
ssh-keygen -R {subdomain}.vm.runagentos.com
Then reconnect—you'll be prompted to accept the new key.
Slow Connection
Try enabling compression:
ssh -C dev@{subdomain}.vm.runagentos.com
Or add to your SSH config:
Host agentos
Compression yes
Security Notes
- SSH keys are injected at VM creation time
- The
devuser has sudo access - VMs are isolated per user
- Traffic is encrypted end-to-end
Next Steps
- Cloud Onboarding - Complete setup guide
- Billing & Plans - Manage your subscription