Overview
Maestro supports running AI agents on remote servers via SSH. This enables powerful workflows like running agents on GPU-equipped servers, accessing remote codebases, or distributing work across multiple machines.SSH Remote Configuration
Configuration Structure
Setting Up SSH Remote
Add SSH Configuration
Click “Add SSH Remote” and configure:
- Name: Display name (e.g., “GPU Server”)
- Host: Server hostname or IP
- Port: SSH port (default 22)
- Username: SSH username (optional if in ~/.ssh/config)
- Private Key: Path to SSH key (optional)
Test Connection
Click “Test Connection” to verify:
- SSH connection succeeds
- Authentication works
- Remote shell is accessible
Default SSH Options
Maestro uses these default SSH options for all connections:
Custom SSH Options
Add custom options in the SSH configuration:Using ~/.ssh/config
Example SSH Config
Maestro Configuration
With SSH config, you only need:Agent-Level SSH Configuration
Per-Agent Settings
Each agent can have its own SSH configuration:Configuring in UI
SSH Spawn Wrapper
Wrapper Configuration
Usage Example
Wrapper Result
Prompt Handling
SSH remote execution handles prompts differently based on size to avoid command-line length limits.
- Small Prompts (<4000 chars)
- Large Prompts (≥4000 chars)
Embedded in Command LineSmall prompts are embedded directly in the SSH command:Advantages:
- Single command execution
- No stdin complexity
- Works with all agents
Context Grooming with SSH
Context grooming fully supports SSH remote execution, allowing you to groom context on the remote host.
Example
SSH Command Building
Command Structure
Built Command Example
Environment Variables
Environment variables are set in the remote command:Testing SSH Connections
Connection Test
Test via API
Troubleshooting
Authentication Failures
Authentication Failures
Symptoms:
- “Permission denied (publickey)”
- Connection hangs then times out
- Verify SSH key is correct and readable
- Check key is added to remote
~/.ssh/authorized_keys - Ensure
BatchMode: yesdoesn’t conflict with your setup - Try using
~/.ssh/configwithuseSshConfig: true
Command Not Found
Command Not Found
Symptoms:
- “claude: command not found” on remote
- Agent binary not accessible
- Use full path in
customPath(e.g.,/usr/local/bin/claude) - Set
PATHincustomEnvVars - Check agent is installed on remote host
- Verify binary name matches remote (use
agentBinaryName)
Working Directory Issues
Working Directory Issues
Symptoms:
- “No such file or directory”
- Agent can’t find project files
- Use absolute paths for
cwd - Set
workingDirOverridein agent SSH config - Verify directory exists on remote host
- Check permissions on remote directory
Connection Timeouts
Connection Timeouts
Symptoms:
- Connections hang and timeout
- “Connection timed out” errors
- Increase
ConnectTimeoutin custom options - Add
ServerAliveIntervalto keep connection alive - Check firewall rules
- Verify network connectivity
Security Best Practices
1. Use SSH Keys, Not Passwords
2. Protect Private Keys
3. Use Key Passphrases
- Always set a passphrase on private keys
- Use ssh-agent to avoid repeated passphrase entry
- Never store passphrases in Maestro config
4. Limit Key Scope
5. Monitor SSH Access
Next Steps
- Learn about Context Management for remote context grooming
- Explore Configuration for advanced SSH settings
- Review General Usage for agent management workflows