在Windows上使用emacs Tramp,我试图远程登录到Windows PC。它发出以下plink命令失败(在emacs和cmd.exe上)
虽然腻子给了我一个会议。我想通过emacs使用它。我需要做些什么才能在Windows上使用Tramp。
注意:我已经尝试了一个SO答案中提到的byte-compile-file tramp-sh.el修复程序。更新为使用Emacs 26.1通过Git MSys2(最小的cygwin,我们可以说)。提到了几个答案,并没有找到目标Windows PC的帮助。任何帮助指针都表示赞赏。
tsmd.ek:
C:\Users\myUser>plink -v -l int***** -ssh -t inpu******* " env 'TERM=dumb' 'PROMPT_COMMAND=' 'PS1=
#$ ' ssh " && exit | exit
...
...
Sent password
Access granted
Opening session as main channel
Opened main channel
Allocated pty (ospeed 38400bps, ispeed 38400bps)
Started a shell/command
/bin/sh: env: command not found
Server sent command exit status 0
Disconnected: All channels closed
Emacs的:
Tramp: Opening connection for int*****@inpu******* using plink...
Tramp: Sending command ‘plink -l int***** -ssh -t inpu******* " env 'TERM=dumb' 'PROMPT_COMMAND=' 'PS1=#$ ' /bin/sh " && exit || exit’
Tramp: Waiting for prompts from remote shell...
Tramp: Sending password
Tramp: Waiting for prompts from remote shell...failed
Tramp: Opening connection for int*****@inpu******* using plink...failed
更新1:使用MSys2代替/ bin / sh退出(预计使用MSys2启动shell会话)
Sent password
Access granted
Opening session as main channel
Opened main channel
Allocated pty (ospeed 38400bps, ispeed 38400bps)
Started a shell/command
*exits here*
Tramp期望“/ bin / sh”作为远程shell。请参阅变量tramp-methods
,条目“plink”,属性tramp-login-program
。你可以改变它(Tramp手册解释),但无论你选择什么,它必须是POSIX兼容的shell。不知道,MS Windows上是否有这样的野兽。