upvote
In retrospect, the name `emacsclient` was a poor one because in 2026 most folks new to Emacs expect it to act like a REST client, where runtime state is synchronized between the client and server over a network. Emacs' usage of ‘client’ and ‘server’ here refer to the usage of a Unix local domain (i.e. file system) socket for simple control commands from the socket client. This was later extended to support a network socket, but the client still only sends simple control commands.
reply
Forwarding the socket doesn't work, but if you use X11 then you can use `ssh -X`, and the remote Emacs will open a frame on your local X server.

Do beware though that if you use the non-PGTK GTK build, closing this new frame will crash the remote Emacs.

reply
could you see the reason it didn't work?
reply
It's been a number of years, and all I really remember is coming to the conclusion that "emacsclient only works with a local server." It uses a domain socket for this, but forwarding that from a remote server doesn't seem to be enough.

Simply editing a remote file over an ssh connection is easy enough using TRAMP, but that isn't the same as accessing existing buffers in a remote server.

reply