Problem
The SSH reverse tunnel in ssh-manager.ts hardcodes port 3000 on the remote side and 3010 on the local side:
await this.setupReverseTunnel(config.id, 3000, 3010);
This has two issues:
- The local port should use
WEB_PORT (now configurable via ATOO_PORT env var) instead of hardcoded 3010
- The remote port (
3000) might already be in use on the remote machine — it should be dynamically allocated
Suggested approach
- Request port
0 on the remote side so SSH picks a free port
- Pass the allocated port as
ATOO_PORT env var when spawning the agent on the remote machine, so the MCP server connects to the correct tunneled port
Context
Remote agent spawning over SSH is not fully wired up yet — the reverse tunnel is prep work. This should be addressed when implementing SSH remote agents.
Problem
The SSH reverse tunnel in
ssh-manager.tshardcodes port3000on the remote side and3010on the local side:This has two issues:
WEB_PORT(now configurable viaATOO_PORTenv var) instead of hardcoded30103000) might already be in use on the remote machine — it should be dynamically allocatedSuggested approach
0on the remote side so SSH picks a free portATOO_PORTenv var when spawning the agent on the remote machine, so the MCP server connects to the correct tunneled portContext
Remote agent spawning over SSH is not fully wired up yet — the reverse tunnel is prep work. This should be addressed when implementing SSH remote agents.