【问题标题】:Windows Emacs : copy/edit files from/to remote UNIX machine?Windows Emacs:从远程 UNIX 机器复制/编辑文件?
【发布时间】:2016-12-03 16:02:44
【问题描述】:

Windows 7(64 位) Emacs 24.5

要浏览本地文件(在 Windows 上),我使用包 dired+。好的。

  1. 如何查看(通过 dired+)远程 UNIX 机器上的文件?
  2. 如何从远程 UNIX 计算机编辑/复制文件(通过 dered+)?

如果不使用 Emacs,我会通过 windows 控制台使用下一条命令连接到远程 UNIX 机器:

ssh -oStrictHostKeyChecking=no login@ip.of.unix.machine

在 emacs 中: 尝试从 Windows 7 连接到 Unix:

/ssh:root@1.2.3.4:

错误: ssh -1 root -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none 1.2.3.4 && exit ||退出

不会分配伪终端,因为标准输入不是终端。 无法创建目录“/home/Alex/.ssh”。

ssh_askpass: exec(/usr/sbin/ssh-askpass): 没有那个文件或目录 主机密钥验证失败

【问题讨论】:

标签: emacs


【解决方案1】:

我刚刚找到了解决方案 - 您需要指向 git-gui--askpass 的环境变量 SSH_ASKPASS。就我而言,它位于git安装目录中

(setenv SSH_ASKPASS "...Git\mingw64\libexec\git-core\git-gui--askpass")

【讨论】:

  • 我使用 Tramp 模式,它工作正常。我可以从远程 Linux 机器复制/移动文件。
  • 我在Windows 10 下使用emacs 26.3 而没有mingw64。幸运的是,我已经安装了Git,并且建议的解决方案也适用于我。 @RecencyEffect 你让我开心,谢谢!!!
【解决方案2】:

使用流浪汉。请参阅 Emacs 手册,节点 Remote Files

在 Dired 中,包括Dired+,只需对要在 Dired 模式下打开的远程目录使用远程文件语法即可。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-21
    • 1970-01-01
    • 1970-01-01
    • 2015-11-05
    • 2012-09-12
    • 2015-03-05
    相关资源
    最近更新 更多