Pretty ingenious workaround. Just a note to skip some of the first 'blind' section (installing openssh server through the desktop environment with no screen visible):
Ctrl+Alt+F1 still works in many distros to switch VTs to a text-mode terminal tty1, and likely also works without logging into the desktop. Ctrl-Alt-F7 to switch back.
From here, you should be able to login blind, then sudo apt install openssh-server (assuming Internet connectivity,) or kill whatever misbehaving process, or even restart the whole DE or computer.
Switching to TTY2 is probably a better idea. I haven't used Linux in a while, but IIRC modern distributions use TTY1 for the graphical session due to some sort of limitation with systemd.
Actually, it dates from a couple of years before systemd existed, and started with the idea of minimizing monitor flicker during the system bootstrap in Fedora. The idea was to make the display not switch between text and graphics modes, as it did when successively switching from graphical splash screen to textual virtual terminal to graphical X display. Starting the X server on the default virtual terminal eliminated the middle part.
By the time that systemd came along, this was already established Fedora behaviour with upstart. The systemd people had to work to replicate existing semantics.
Not a limitation, but the notion that the graphical console should replace the text console on the same TTY.
Kind of makes sense, but very consistency/tradition-breaking. One of those decisions that should have been implemented a while back in order to be elegant.
Not so on my Bunsenlabs installation, which is just plain Debian, systemd included, with a minimalist OpenBox theme. Ctrl+Alt+F1 from the desktop gives me a text login session, and Alt+F7 returns to the desktop. Alt+F(1-6) switches between six text sessions.
Ctrl+Alt+F1 still works in many distros to switch VTs to a text-mode terminal tty1, and likely also works without logging into the desktop. Ctrl-Alt-F7 to switch back.
From here, you should be able to login blind, then sudo apt install openssh-server (assuming Internet connectivity,) or kill whatever misbehaving process, or even restart the whole DE or computer.