Search code examples
securityemacsmulti-useremacsclient

How can I secure an emacs-server?


I'd like to ensure that only I can connect to an emacs server that I initialised. I frequently use machines that other people could be SSH'd into, and I don't see what's to stop them opening emacsclient and running M-x kill-emacs which would screw me over.

I looked at the documentation for emacsserver and emacsclient but couldn't find what I was looking for.

Is there a way to do this?


Solution

  • That happens out of the box, of course! The Emacs server creates a socket that only you can access (permissions 600 or 700, in a directory with permissions 600 for good measure).