[macOS] SSH handshake verification fails after Docker container restart — sandbox requires destroy/recreate
Description
Environment: macOS Apple Silicon (Mac Mini), Docker Desktop 29.2.1, OpenShell 0.0.13, NemoClaw 0.1.0, OpenClaw 2026.3.11
What happens: After any Mac reboot or docker restart openshell-cluster-nemoclaw, the sandbox shows Phase: Ready but all SSH connections fail with SSH connection: handshake verification failed in a loop. nemoclaw
Reproduction Steps
Steps to reproduce:
Install NemoClaw on macOS Apple Silicon via curl -fsSL https://nvidia.com/nemoclaw.sh | bash
Complete onboard (NVIDIA Cloud API, any model, any sandbox name)
Verify sandbox works: nemoclaw
Expected: Sandbox reconnects after container restart. Actual: SSH handshake permanently broken. Only destroy --yes + full reinstall resolves it.
Environment
Environment:
macOS 26.3.1 Mac Mini, Apple Silicon Docker Desktop 29.2.1 OpenShell 0.0.13 NemoClaw 0.1.0 OpenClaw 2026.3.11 (29dc654) Node.js v22.22.1 npm 10.9.4 Homebrew 5.1.0
Debug Output
Logs
Checklist
- [x] I confirmed this bug is reproducible
- [x] I searched existing issues and this is not a duplicate
✨ Thanks for submitting this issue with a detailed description, it addresses a bug that could cause issues with the SSH connection, which could improve the reliability of NemoClaw on MacOS.
Possibly related open PRs: #838 docs: improve macOS install guidance for Xcode and container runtimes (#814), #819 feat: add Podman as supported container runtime for macOS and Linux, #635 fix(docker): set nemoclaw-start permissions to 755 for sandbox readability (fixes #622)
I cannot understand why nobody is giving this any attention. The only work around is to recreate your sandbox every time reboot. This is a problem on Linux as well. It's not specific to the Mac.
Agreed! I've been having this same issue every time but also on Windows with Ubuntu WSL
Getting the same issue with Mac
Experiencing the same issue on Ubuntu 22.04.5 LTS.
Hi, I do think issue needs attention. This is definately a major one
Environment:
Device: NVIDIA DGX Spark GB10 OS: Ubuntu 24.04 (aarch64) Docker: 28.x OpenShell: 0.0.16 NemoClaw: latest OpenClaw: 2026.3.11 Node.js: v22.22.1 Inference: Ollama (local), model: nemotron-cascade-2:latest
Issue:
This is the same bug as #768, but reproduced on DGX Spark GB10 (Linux/aarch64), confirming it is cross-platform and not macOS-specific.
After rebooting the Spark, the openshell-cluster-nemoclaw Docker container restarts automatically (configured with --restart always), shows as healthy, and the sandbox shows Phase: Ready — but all SSH connections fail with SSH connection: handshake verification failed in a loop. nemoclaw
Same issue on WSL2 — fix is to always regenerate SSH config fresh
Confirmed this on WSL2 + Docker Desktop. After any Docker container restart or computer reboot, SSH handshake fails because the gateway rotates its TLS certificates (see #888).
The fix: never cache openshell sandbox ssh-config output. Regenerate it fresh on every SSH call:
SSH_CONF=$(mktemp /tmp/nemoclaw-XXXXXX.conf)
openshell sandbox ssh-config "$SANDBOX" > "$SSH_CONF"
ssh -T -F "$SSH_CONF" "openshell-${SANDBOX}" "your-command"
rm -f "$SSH_CONF"
Since the ssh-config reflects the current certs after gateway restart, using a fresh config on every connection means cert rotation is transparent. We call this pattern in our startup script and every bridge connection — zero destroy/recreate cycles needed.
If openshell sandbox ssh-config itself fails (returns empty), the gateway isn't ready yet — retry with backoff rather than destroying the sandbox.
Same issue on WSL2 — fix is to always regenerate SSH config fresh
Confirmed this on WSL2 + Docker Desktop. After any Docker container restart or computer reboot, SSH handshake fails because the gateway rotates its TLS certificates (see #888).
The fix: never cache
openshell sandbox ssh-configoutput. Regenerate it fresh on every SSH call:SSH_CONF=$(mktemp /tmp/nemoclaw-XXXXXX.conf) openshell sandbox ssh-config "$SANDBOX" > "$SSH_CONF" ssh -T -F "$SSH_CONF" "openshell-${SANDBOX}" "your-command" rm -f "$SSH_CONF" Since the ssh-config reflects the current certs after gateway restart, using a fresh config on every connection means cert rotation is transparent. We call this pattern in our startup script and every bridge connection — zero destroy/recreate cycles needed.
If
openshell sandbox ssh-configitself fails (returns empty), the gateway isn't ready yet — retry with backoff rather than destroying the sandbox.
No, it didn't work for me. I guess it's because openshell cached the certs somewhere else?
Thanks for merging that PR!
Does anyone get a chance to validate if this was fixed? I'm still getting the same issue after pulling the main. It looks like the fixing PR was to remove the sandbox ssh config?