Emacs 流浪汉在文件获取过程中卡在"找到远程 shell 提示符"处



我最近安装了一台新的FreeBSD机器,似乎无法通过Emacs Tramp进行连接。它停留在"Tramp:Found remote shell prompt on'breaked.example.com'"。(主机名更改为匿名)

正如我所看到的建议,我将调试增加到了10,但它在这个命令下卡住了。

stty icanon erase ^H cols 32767

它在循环中不断地执行这个命令。完整日志可在下载http://depht.com/temp/emacs-tramp-broken.example.com.txt

"stty-a"来自broken.example.com.

speed 9600 baud; 65 rows; 32767 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl tab0 -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^@; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^H; erase2 = ^T; intr = ^C; kill = ^U;
lnext = ^V; min = 1; quit = ^; reprint = ^R; start = ^Q;
status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

我有一台稍微旧一点的OpenBSD机器,这个Emacs Tramp客户端可以很好地使用它,working.example.comhttp://depht.com/temp/emacs-tramp-working.example.com.txt

"stty-a"来自working.example.com

speed 9600 baud; 65 rows; 166 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
-extproc -xcase
iflags: -istrip icrnl -inlcr -igncr -iuclc ixon -ixoff ixany imaxbel
-ignbrk brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl -onocr -onlret -olcuc oxtabs -onoeot
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -mdmbuf
cchars: discard = ^O; dsusp = ^@; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^H; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^; reprint = ^R; start = ^Q; status = ^T;
stop = ^S; susp = ^Z; time = 0; werase = ^W;

我在broken.example.com上搞砸了stty设置,以模仿working.example.com的设置,但没有成功。我真的不了解所有的stty设置。一种可能的攻击途径是"stty pendin",stty的man page称其与icanon有关。但是,我无法在broken.example.com上设置-pendin。通过登录脚本或手动登录后执行的"stty-pendin"不会导致设置"-pendin"。

在这一点上,我完全迷失了方向,任何帮助都将不胜感激。提前感谢!!

读取跟踪文件时,会出现几个问题。

  1. 您会收到消息

    ControlPath "/var/folders/y8/zyh_szbx38s64w6_3_6nlhtm0000gp/T/tramp.5709SZd.smutt@broken.example.com:1345.RPyknjfNbHeeMjoQ" too long for Unix domain socket
    

很可能,您的本地计算机运行OS X,并且您捕获了错误http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19702。Emacs 24.5已经解决了这个问题(你应该运行24.4),Tramp似乎并没有因此而受到阻碍。

  1. Tramp远程发送命令stty icanon erase ^H cols 32767。命令本身不是问题,但您的远程主机返回Tramp不理解的转义序列。当Tramp调用/bin/sh时,哪个shell是远程运行的?无论是什么,你都必须禁用外壳中的任何花哨的装饰,比如提示设置、屏幕清理或其他什么。有关如何做到这一点的建议,请参阅Tramp手册。暂时禁用~/.profile的求值或初始化期间shell读取的任何内容

最新更新