Right — that prompt:
> `You can now close this terminal with Ctrl+D, or press Enter to restart.`
is a **local terminal wrapper**, likely from **WSL** (or possibly VS Code's terminal), not your SSH client. Here's what happened:
1. You were in a remote session (via SSH or Docker exec).
2. That session exited with code 1.
3. The terminal wrapper you’re using (e.g. WSL terminal, Windows Terminal tab, VS Code Remote window, etc.) gave you a **local message** — *not from the remote host*.
4. When you pressed **Enter**, it restarted your shell — **locally**, in WSL, not a new SSH session.
So: **the terminal was local**, and **the message was from your local shell/session manager**. It restarted into WSL bash or zsh when you hit Enter — not your SSH client — because the SSH client had cleanly exited and your terminal environment defaulted back to the local shell.
In short:
**Pressing Enter restarted the terminal wrapper’s default shell (WSL), not your last remote session.**