【发布时间】:2014-04-20 01:54:17
【问题描述】:
我正在尝试在 Emacs Tramp 中使用 plink.exe 进行 SSH。我已经下载了 plink.exe,它可以在普通终端中运行,但是当我使用时
C-x C-f
/gg88@afs1.njit.edu:/afs/cad/u/g/g/gg88/public_html/index.html
在小缓冲区中,
Tramp: Waiting for prompts from remote shell also appears.
plink.exe所在的c:/Users/name/emacs-24.3/bin在exec-path中。我的 .emacs 仅包含这些行。但是在检查 exec-path 后确实包含 plink.exe 所在的目录。
(require 'tramp)
(setq tramp-default-method "plink")
使用m-x eshell也没有问题,进入c:/Users/name/emacs-24.3/bin,运行
plink.exe gg88@afs1.njit.edu
接下来我该怎么做才能让它发挥作用?
编辑 通过将 plink 的路径直接添加到 PATH 变量来识别 plink,但仍然有
Tramp: Waiting for prompts from remote shell also appears.
问题
Edit2 消息缓冲区
Tramp: Opening connection for gg88@afs1.njit.edu using plink...
Tramp: Sending command `plink -l gg88 -ssh afs1.njit.edu && exit || exit'
Tramp: Waiting for prompts from remote shell
Tramp: Sending Password
Tramp: Waiting for prompts from remote shell [7 times]
Tramp: Sending command `plink -l gg88 -ssh afs1.njit.edu && exit || exit'
Tramp: Opening connection for gg88@afs1.njit.edu using plink...done
Quit [2 times]
【问题讨论】:
-
OT1H 您说“我已将 plink.exe 所在的目录添加到 exec-path”,但 OTOH 您显示的 .emacs 不会触及 exec-path。它是哪一个?顺便说一句,Tramp 默认是启用的,所以你不需要
(require 'tramp)。 -
我使用了 (add-to-list 'exec-path "C:/Users/name/emacs24-3/bin") 其中 plink.exe 在 bin 中。它不在 .emacs 中,但是当我使用 C-h v exec-path 检查它的值时,该路径仍然存在。
-
最终通过将 plink 添加到 PATH 变量中来识别 plink,但 Tramp: Waiting for prompts from remote shell 也会出现。仍然是个问题