我正在使用 emacs tramp mode通过 ssh 远程编辑文件。问题是每次保存正在编辑的文件时都必须输入用户密码。我觉得这很烦人。我怎样才能只写一次密码/编辑 session ?
最佳答案
啊,来自tramp docs关于密码缓存,您可以设置:
(setq password-cache-expiry nil)
需要包 password-cache.el .
此外,在流浪者来源中,它提到阅读 ssh-agent(1)手册页,其中显示了如何进行设置,以便您不必重新输入密码(在 Emacs 内部或外部):
There are two main ways to get an agent set up: The first is that the agent starts a new subcommand into which some environment variables are exported, eg ssh-agent xterm &. The second is that the agent prints the needed shell commands (either sh(1) or csh(1) syntax can be generated) which can be evalled in the calling shell, eg eval
ssh-agent -s
for Bourne-type shells such as sh(1) or ksh(1) and evalssh-agent -c
for csh(1) and derivatives.
关于emacs - Emacs 临时模式下的密码编辑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/840279/