开发者

How can I secure an emacs-server?

开发者 https://www.devze.com 2023-03-04 18:44 出处:网络
I\'d like to ensure that only I can connect to an emacs serv开发者_运维知识库er that I initialised. I frequently use machines that other people could be SSH\'d into, and I don\'t see what\'s to stop t

I'd like to ensure that only I can connect to an emacs serv开发者_运维知识库er 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?


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).


It looks like you can specify server-socket-file for the server and server-socket-dir for emacsclient. Simply place the socket in a directory where only you have access and you should be set.

0

精彩评论

暂无评论...
验证码 换一张
取 消