You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the OpenShell gateway restarts (e.g., after openshell gateway start or system reboot), it regenerates its mTLS CA keypair. Existing sandbox pods still hold the old gateway CA certificate, so every subsequent connection attempt fails with:
Workaround: always regenerate SSH config fresh — don't cache it
The TLS cert rotation breaks any cached SSH configs. The fix is to never persist openshell sandbox ssh-config output — regenerate it fresh on every connection attempt.
In any script that SSHes into the sandbox:
# Generate fresh SSH config each time — never cache this
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"
This handles cert rotation transparently — ssh-config always returns the current valid config reflecting the new certificates. We call this at the top of every startup script and every SSH exec, so cert rotation after a gateway restart is never a problem.
Also helps: run openshell sandbox ssh-config as a health check before attempting anything. If it returns empty or errors, the gateway isn't ready yet — retry with backoff rather than failing.
This should be resolved by OpenShell #753, which persists sandbox state across gateway stop/start cycles. We'll close this issue once that lands and we validate it fixes the cert mismatch.
Additional root cause found: NSSH1 handshake secret mismatch in Sandbox CR
Beyond the TLS cert rotation, there's a separate failure mode: the gateway regenerates its OPENSHELL_SSH_HANDSHAKE_SECRET on restart, but the Sandbox custom resource (CR) retains the stale secret. This causes kex_exchange_identification: Connection closed by remote host even after the pod is bounced, because the CR templates the pod spec with the old value.
Workaround (tested on v0.0.14 gateway, helm release v4):
Read the gateway's current secret: kubectl exec openshell-0 -n openshell -- printenv OPENSHELL_SSH_HANDSHAKE_SECRET
Patch the Sandbox CR with the new value: kubectl get sandbox my-assistant -n openshell -o json → replace the secret → kubectl apply -f -
Delete the sandbox pod to force recreation with the patched CR
This could be automated in nemoclaw onboard or a startup script. We've added it to our 1-click startup to auto-detect and fix the mismatch.
The remaining legacy caveat is documented: sandboxes created with OpenShell versions older than 0.0.24 may need OpenShell upgrade plus sandbox recreation. Current latest installs a newer validated OpenShell, and the sandbox-survival E2E explicitly covers this issue (#888/#1086).
Activity
rafaelluna commentedon Mar 27, 2026
I have the same issue every time my computer restarts. The onboarding process just wipes the whole configuration.
salmanadil84 commentedon Mar 29, 2026
I'm having the same problem. Every time my computer or gateway restarts, I have to onboard again, and I lose all my settings and configuration.
dknos commentedon Mar 30, 2026
Workaround: always regenerate SSH config fresh — don't cache it
The TLS cert rotation breaks any cached SSH configs. The fix is to never persist
openshell sandbox ssh-configoutput — regenerate it fresh on every connection attempt.In any script that SSHes into the sandbox:
This handles cert rotation transparently —
ssh-configalways returns the current valid config reflecting the new certificates. We call this at the top of every startup script and every SSH exec, so cert rotation after a gateway restart is never a problem.Also helps: run
openshell sandbox ssh-configas a health check before attempting anything. If it returns empty or errors, the gateway isn't ready yet — retry with backoff rather than failing.ericksoa commentedon Apr 5, 2026
This should be resolved by OpenShell #753, which persists sandbox state across gateway stop/start cycles. We'll close this issue once that lands and we validate it fixes the cert mismatch.
fix(onboard): upgrade OpenShell to 0.0.24 for sandbox survival across…
dknos commentedon Apr 9, 2026
Additional root cause found: NSSH1 handshake secret mismatch in Sandbox CR
Beyond the TLS cert rotation, there's a separate failure mode: the gateway regenerates its
OPENSHELL_SSH_HANDSHAKE_SECRETon restart, but the Sandbox custom resource (CR) retains the stale secret. This causeskex_exchange_identification: Connection closed by remote hosteven after the pod is bounced, because the CR templates the pod spec with the old value.Workaround (tested on v0.0.14 gateway, helm release v4):
kubectl exec openshell-0 -n openshell -- printenv OPENSHELL_SSH_HANDSHAKE_SECRETkubectl get sandbox my-assistant -n openshell -o json→ replace the secret →kubectl apply -f -This could be automated in
nemoclaw onboardor a startup script. We've added it to our 1-click startup to auto-detect and fix the mismatch.ericksoa commentedon May 1, 2026
Closing this as fixed for current supported NemoClaw/OpenShell versions.
Fixing PR chain:
The remaining legacy caveat is documented: sandboxes created with OpenShell versions older than 0.0.24 may need OpenShell upgrade plus sandbox recreation. Current latest installs a newer validated OpenShell, and the sandbox-survival E2E explicitly covers this issue (#888/#1086).
test(e2e): migrate test-sandbox-survival.sh to vitest (#5332)