emacs - Emacs 临时模式下的密码编辑

标签 emacs ssh passwords tramp

我正在使用 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 eval ssh-agent -c for csh(1) and derivatives.

关于emacs - Emacs 临时模式下的密码编辑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/840279/

相关文章:

azure - 授予对新主机的访问权限?

python - 密码检查器 Python

mysql - 如何在工作台中选择加密

emacs - 无法为 Ctrl- 键设置键盘映射;

macos - 无法打开显示错误

Linux shell 脚本 - 如何切换用户并运行脚本?

GitLab:我无法推​​送或克隆 repo 协议(protocol),要求提供 Git 密码

emacs - 如何使 vc-diff 输出更紧凑

bash - 从一个巨大的文本文件中提取许多前导行

Emacs 可以告诉我调用特定函数的位置吗?