Earlier quoted context omitted.
Likely you want to use: C-x C-f /ssh:remotehost:filename RET and hope that you haven't broken it by using a weird prompt on the other end. Emacs expects to get a standard bash shell when it connects over ssh. And for the record, it's 2023 and you can't just assume someone's keybindings. I use something more like: SPC f f /ssh:foo@bar:baz@quux:/etc/motd
What’s the baz@quux part for?
Jump host, equivalent to using -J with ssh since quux is visible to bar but not visible to the emacs box