Just for fun, on a VPS I was about to terminate anyway, I ran
sudo rm -rf / --no-preserve-root
and after that all commands, including
/bin/bash
returned command not found, which makes sense as they were deleted. But how was I still SSHed into it, and able to somewhat use bash even though the files no longer existed?
The OS and services run in memory, so they can keep running (but of course they cannot load anything from disk any more).
You will also not be able to open another ssh-session :-)