You could use vscode I suppose, a bit overkill as a basic text editor, but there's an ssh/remote shell plugin that will work well, and I'm sure you'll find other uses for it.
I just played around with it. My file manager is Nemo (I am using Linux Mint) which allows you to connect to another computer using sftp and being able to browser the files and directories on that machine and be able to open text files.
Not the way I would prefer to do it, but a workable solution.
However I would also like to edit files on the machine with sudo privelages. I cannot connect to the machine as a normal user and right click in Nemo and open the file manager as root, as it will just open the sftp file manager as root on my device, not the remote device.
I did find this as a solution but it makes my remote machine unsecure by connecting to the remote machine as the root user by enabling the root user on the remote machine. However rather use sudo than enable the root user.
If you are doing this as root, I have to question what it is you're up to. The only time you should be editing files as root is config files, and then vim or nano should meet your needs.
Emacs is hands down my favorite editor but it's more text than gui (definitely worth it to learn and use though). For remote files, you can just open them with c-x c-f (normal file opening shortcut) then /ssh:user@host:/path/to/file
TRAMP stands for “Transparent Remote (file) Access, Multiple Protocol”. This package provides an easy, convenient, and consistent interface to editing remote files transparently, just as if they are local files. This extends to editing, version control, dired, and more.