Earlier quoted context omitted.
Just use tramp mode instead. The fact it can do multi-hop edits is far too much power for us mere mortals.
It's a very different experience: - I already have tmux launched, if ssh drops – I can continue - I don't have to match windows to ssh sessions -- just have them in my tmux
Tramp runs in your local Emacs and edits files remotely. It can also launch processes remotely and keep track of them.