Tramp 远程编辑报错 Wrong method specification for ‘ssh’

使用Tramp编辑远程文件,报错wrong method specification for ‘ssh’,文件列表显示正常,想咨询下如何debug进行排查? 使用 -Q启动也无法打开文件 emacs-25.3.1 specemacs开发分支。

平台? 是否安装有 ssh?

manjaro linux,多次实验发现就一台远程机器不行,那台机器的特征是登录账户是root,并且root密码被我干掉了。

试试看下 (info “(tramp) Traces and Profiles”),尤其是 tramp-verbose

tramp-verbose is a variable defined in ‘tramp.el’.
Its value is 3

Documentation:
Verbosity level for Tramp messages.
Any level x includes messages for all levels 1 .. x-1.  The levels are

 0  silent (no tramp messages at all)
 1  errors
 2  warnings
 3  connection to remote hosts (default level)
 4  activities
 5  internal
 6  sent and received strings
 7  file caching
 8  connection properties
 9  test commands
10  traces (huge).

You can customize this variable.

可以试试设置到 6。

用了一下旧版本的 Emacs,竟然也出现这个 Wrong method specification for ‘ssh’ 错误。

又在各版本上跑了一下测试代码,结果出乎意料:

Column 1 Column 2
Emacs 29.0 :white_check_mark:
Emacs 28.1 :x:
Emacs 27.2 :white_check_mark:
Emacs 27.1 :x:
Emacs 26.3 :x:
Emacs 26.1 :x:
Emacs 25.3 :x:
Emacs 25.1 :x:

从 Emacs 24 到 29,从 OSX 10.6 到 10.13,这么多年一路用来都没遇到问题。回头用一下旧版却出问题了,怎么回事?

找到错误信息的来源 tramp-sh-handle-file-local-copy 函数:

(defun tramp-sh-handle-file-local-copy (filename)
  ...
  (let ((rem-enc (tramp-get-inline-coding v "remote-encoding" size)))
    (cond
     ;; `copy-file' handles direct copy and out-of-band methods.
     ((or ...) ...)

     ;; Use inline encoding for file transfer.
     (rem-enc ...)

     ;; Oops, I don't know what to do.
     (t (tramp-error
         v 'file-error "Wrong method specification for `%s'" method))))
  ...)

出错是因为 tramp-get-inline-coding -> tramp-find-inline-encoding 返回了 nil。后面这个函数的用途是逐个测试 tramp-local-coding-commandstramp-remote-coding-commands 两个列表的命令,如果所有命令都出错(28.1 例外,它似乎引入了新的 bug),最后的结果就是 Wrong method ...

(defun tramp-find-inline-encoding (vec)
  ...
  (let ((local-commands tramp-local-coding-commands)
        ...
        (while (and local-commands (not found))
          ...
          (let ((remote-commands tramp-remote-coding-commands))
            ...
            (while (and remote-commands (not found))
              ...
              (unless (tramp-send-command-and-check
                       vec
                       (format "echo %s | %s | %s" magic rem-enc rem-dec)
                       t)
                (throw 'wont-work-remote nil))
              ...)))))

虽然知道错误在哪里,但还是不知道错误的原因。例如现在我这里 27.2 不出错,是因为下面这条命令返回了正确结果:

(let ((tramp-remote-coding-commands
       '(
         (b64 tramp-hexdump-awk-encode tramp-awk-decode) ;; <---
         )))

  (tramp-find-inline-encoding
   '(tramp-file-name "ssh" nil nil "myvps" nil "/etc/config/network" nil)))
  ;; => tramp-awk-decode

但 27.2 之前的版本没有这条命令,所以如果不出错的话,应该是别的命令返回正确结果。我现在没有正确的环境去逐一验证那些命令。也许跟 openssl 或 coreutils 有关?


测试脚本和步骤

test-tramp-wrong-method-specification-for-ssh-issue.el
;;; Usage: /path/to/emacs -nw -Q -l /path/to/test-tramp-wrong-method-specification-for-ssh-issue.el [--batch]
;;; Date: 2022-03-06_12.23.56

;; ---------------------------------------------------------------------------

(setq user-emacs-directory (make-temp-file "temp-emacs-dir--" 'tmpdir "/"))
(setq package-user-dir (concat user-emacs-directory "elpa/"))

;; ---------------------------------------------------------------------------

(when (version< "28.0" emacs-version)
  (setq tramp-allow-unsafe-temporary-files t))

(defun tramp-send-command-and-check@debug (orig-fn vec command &rest rest)
  (let ((ret))
    (unwind-protect
        (setq ret (apply orig-fn vec command rest))
      (message "[DEBUG] ret: %s, vec: %S, command: %S, rest: %s"
               ret
               vec
               (truncate-string-to-width
                (replace-regexp-in-string "\n" "\\\\n" command) 70 nil nil t)
               rest))
    ret))

(define-advice tramp-find-inline-encoding (:around (orig-fn &rest args) debug)
  (let (ret)
    (advice-add 'tramp-send-command-and-check
                :around 'tramp-send-command-and-check@debug)
    (setq ret (apply orig-fn args))
    (message "[DEBUG][tramp-find-inline-encoding] return: %S, args: %S" ret args)
    ret)
  (advice-remove 'tramp-send-command-and-check
                 'tramp-send-command-and-check@debug))

(if noninteractive
    (progn
      (find-file "/ssh:myvps:/etc/config/network")
      (message "SUCCESS."))
  (add-hook 'emacs-startup-hook
            (lambda ()
              (view-echo-area-messages)
              (find-file "/ssh:myvps:/etc/config/network")
              (message "SUCCESS."))))

;;; test-tramp-wrong-method-specification-for-ssh-issue.el ends here
test-tramp-wrong-method-specification-for-ssh-issue.sh
#!/usr/bin/env bash

logfile=./test-tramp-wrong-method-specification-for-ssh-issue.log
script=./test-tramp-wrong-method-specification-for-ssh-issue.el

bins=(
    /Applications/Emacs-29.0.app/Contents/MacOS/Emacs
    /Applications/Emacs-28.1.app/Contents/MacOS/Emacs
    /Applications/Emacs-27.2.app/Contents/MacOS/Emacs
    /Applications/Emacs-27.1.app/Contents/MacOS/Emacs
    /Applications/Emacs-26.3.app/Contents/MacOS/Emacs
    /Applications/Emacs-26.1.app/Contents/MacOS/Emacs
    /Applications/Emacs-25.3.app/Contents/MacOS/Emacs
    /Applications/Emacs-25.1.app/Contents/MacOS/Emacs
)

cd $(dirname $0)
rm $logfile
touch $logfile

for bin in "${bins[@]}"; do
    printf -- '-%.0s' {1..80} >> $logfile
    printf "\n" >> $logfile
    printf "${bin} -nw -Q -l $script --batch\n" | tee -a $logfile
    ${bin} -nw -Q -l $script --batch >> $logfile 2>&1
    printf "\n\n" >> $logfile
done
$ ls
test-tramp-wrong-method-specification-for-ssh-issue.el
test-tramp-wrong-method-specification-for-ssh-issue.sh

$ sh test-tramp-wrong-method-specification-for-ssh-issue.sh

测试结果

test-tramp-wrong-method-specification-for-ssh-issue.log
--------------------------------------------------------------------------------
/Applications/Emacs-29.0.app/Contents/MacOS/Emacs -nw -Q -l ./test-tramp-wrong-method-specification-for-ssh-issue.el --batch
Tramp: Sending command ‘exec ssh -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none myvps’
Tramp: Found remote shell prompt on ‘myvps’
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: t, command: "tramp_hexdump_awk_encode () {\\n\\hexdump -v -e '16/1 \" %02x\" \"\\n\"' | \\…"
[DEBUG] ret: t, command: "tramp_hexdump_awk_encode </dev/null"
[DEBUG] ret: t, command: "tramp_awk_decode () {\\n\\awk '\\\\nBEGIN {\\n  b64 = \"ABCDEFGHIJKLMNOPQRS…"
[DEBUG] ret: t, command: "echo xyzzy | tramp_hexdump_awk_encode | tramp_awk_decode"
[DEBUG][tramp-find-inline-encoding] return: tramp-awk-decode, args: ((tramp-file-name "ssh" nil nil "myvps" nil "/etc/config/network" nil))


SUCCESS.


--------------------------------------------------------------------------------
/Applications/Emacs-28.1.app/Contents/MacOS/Emacs -nw -Q -l ./test-tramp-wrong-method-specification-for-ssh-issue.el --batch
Tramp: Sending command ‘exec ssh -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none myvps’
Tramp: Found remote shell prompt on ‘myvps’
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
File error: Script tramp_perl_encode_with_module is not applicable on remote host
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
File error: Script tramp_perl_encode_with_module is not applicable on remote host
File error: Wrong method specification for ‘ssh’
[DEBUG] ret: t, command: "test -e /etc/config/network"
[DEBUG] ret: t, command: "test -e /etc/config/network"
[DEBUG] ret: t, command: "/usr/bin/id -gn | sed -e s/^/\\\"/ -e s/\\$/\\\"/"
[DEBUG] ret: t, command: "/usr/bin/id -un | sed -e s/^/\\\"/ -e s/\\$/\\\"/"
[DEBUG] ret: t, command: "test -e /etc/config/network"
Debugger entered--Lisp error: (file-error "Wrong method specification for ‘ssh’")
  signal(file-error ("Wrong method specification for ‘ssh’"))
  (lambda nil (signal 'file-error '("Wrong method specification for ‘ssh’")))()
  run-hook-with-args-until-success((lambda nil (signal 'file-error '("Wrong method specification for ‘ssh’"))))
  find-file-noselect-1(#<buffer network> "/ssh:myvps:/etc/config/network" nil nil "/ssh:myvps:/etc/config/network" (161 (-1 . 1)))
  find-file-noselect("/ssh:myvps:/etc/config/network" nil nil nil)
  find-file("/ssh:myvps:/etc/config/network")
  (progn (find-file "/ssh:myvps:/etc/config/network") (message "SUCCESS."))
  (if noninteractive (progn (find-file "/ssh:myvps:/etc/config/network") (message "SUCCESS.")) (add-hook 'emacs-startup-hook #'(lambda nil (find-file "/ssh:myvps:/etc/config/network") (message "SUCCESS."))))
  eval-buffer(#<buffer  *load*> nil "/Users/*/Dropbox/scratch/emacs/2022-..." nil t)  ; Reading at buffer position 2419
  load-with-code-conversion("/Users/*/Dropbox/scratch/emacs/2022-..." "/Users/*/Dropbox/scratch/emacs/2022-..." nil t)
  load("/Users/*/Dropbox/scratch/emacs/2022-..." nil t)
  command-line-1(("-l" "./test-tramp-wrong-method-specification-for-ssh-is..."))
  command-line()
  normal-top-level()



--------------------------------------------------------------------------------
/Applications/Emacs-27.2.app/Contents/MacOS/Emacs -nw -Q -l ./test-tramp-wrong-method-specification-for-ssh-issue.el --batch
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: nil, command: "\\busybox od -A n </dev/null"
[DEBUG] ret: t, command: "tramp_hexdump_awk_encode () {\\n\\hexdump -v -e '16/1 \" %02x\" \"\\n\"' |..."
[DEBUG] ret: t, command: "tramp_hexdump_awk_encode </dev/null"
[DEBUG] ret: t, command: "tramp_awk_decode () {\\n\\awk '\\\\nBEGIN {\\n  b64 = \"ABCDEFGHIJKLMNOPQ..."
[DEBUG] ret: t, command: "echo xyzzy | tramp_hexdump_awk_encode | tramp_awk_decode"
[DEBUG][tramp-find-inline-encoding] return: tramp-awk-decode, args: ((tramp-file-name "ssh" nil nil "myvps" nil "/etc/config/network" nil))


SUCCESS.


--------------------------------------------------------------------------------
/Applications/Emacs-27.1.app/Contents/MacOS/Emacs -nw -Q -l ./test-tramp-wrong-method-specification-for-ssh-issue.el --batch
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: nil, command: "test -c /dev/zero && od -v -t x1 -A n </dev/null && busybox awk '{}..."
[DEBUG] ret: nil, command: "test -c /dev/stdout"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG][tramp-find-inline-encoding] return: nil, args: ((tramp-file-name "ssh" nil nil "myvps" nil "/etc/config/network" nil))
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: nil, command: "test -c /dev/zero && od -v -t x1 -A n </dev/null && busybox awk '{}..."
[DEBUG] ret: nil, command: "test -c /dev/stdout"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG][tramp-find-inline-encoding] return: nil, args: ((tramp-file-name "ssh" nil nil "myvps" nil "/etc/config/network" nil))
Wrong method specification for ‘ssh’


--------------------------------------------------------------------------------
/Applications/Emacs-26.3.app/Contents/MacOS/Emacs -nw -Q -l ./test-tramp-wrong-method-specification-for-ssh-issue.el --batch
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: nil, command: "test -c /dev/zero && od -v -t x1 -A n </dev/null && busybox awk '{}..."
[DEBUG] ret: nil, command: "test -c /dev/stdout"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG][tramp-find-inline-encoding] return: nil, args: ((tramp-file-name "ssh" nil nil "myvps" nil "/etc/config/network" nil))
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: nil, command: "test -c /dev/zero && od -v -t x1 -A n </dev/null && busybox awk '{}..."
[DEBUG] ret: nil, command: "test -c /dev/stdout"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG][tramp-find-inline-encoding] return: nil, args: ((tramp-file-name "ssh" nil nil "myvps" nil "/etc/config/network" nil))
Wrong method specification for ‘ssh’


--------------------------------------------------------------------------------
/Applications/Emacs-26.1.app/Contents/MacOS/Emacs -nw -Q -l ./test-tramp-wrong-method-specification-for-ssh-issue.el --batch
Tramp: Opening connection for myvps using ssh...
Opening connection for myvps using ssh... \
Tramp: Sending command ‘exec ssh   -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none myvps’
Tramp: Waiting for prompts from remote shell...
Waiting for prompts from remote shell... \
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘myvps’
Tramp: Opening connection for myvps using ssh...done
Tramp: Inserting ‘/ssh:myvps:/etc/config/network’...
Inserting ‘/ssh:myvps:/etc/config/network’ \
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: nil, command: "test -c /dev/zero && od -v -t x1 -A n </dev/null && busybox awk '{}..."
[DEBUG] ret: nil, command: "test -c /dev/stdout"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG][tramp-find-inline-encoding] return: nil, args: ((tramp-file-name "ssh" nil nil "myvps" nil "/etc/config/network" nil))
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: nil, command: "test -c /dev/zero && od -v -t x1 -A n </dev/null && busybox awk '{}..."
[DEBUG] ret: nil, command: "test -c /dev/stdout"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG][tramp-find-inline-encoding] return: nil, args: ((tramp-file-name "ssh" nil nil "myvps" nil "/etc/config/network" nil))
Tramp: Inserting ‘/ssh:myvps:/etc/config/network’...failed
Wrong method specification for ‘ssh’


--------------------------------------------------------------------------------
/Applications/Emacs-25.3.app/Contents/MacOS/Emacs -nw -Q -l ./test-tramp-wrong-method-specification-for-ssh-issue.el --batch
Tramp: Opening connection for myvps using ssh...
Opening connection for myvps using ssh... \
Tramp: Sending command ‘exec ssh   -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none myvps’
Tramp: Waiting for prompts from remote shell...
Waiting for prompts from remote shell... \
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘myvps’
Tramp: Opening connection for myvps using ssh...done
Tramp: Inserting ‘/ssh:myvps:/etc/config/network’...
Inserting ‘/ssh:myvps:/etc/config/network’ \
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: nil, command: "test -c /dev/zero && od -v -t x1 -A n </dev/null && busybox awk '{}..."
[DEBUG] ret: nil, command: "test -c /dev/stdout"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG][tramp-find-inline-encoding] return: nil, args: (["ssh" nil "myvps" "/etc/config/network" nil])
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: nil, command: "test -c /dev/zero && od -v -t x1 -A n </dev/null && busybox awk '{}..."
[DEBUG] ret: nil, command: "test -c /dev/stdout"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG][tramp-find-inline-encoding] return: nil, args: (["ssh" nil "myvps" "/etc/config/network" nil])
Tramp: Inserting ‘/ssh:myvps:/etc/config/network’...failed
Wrong method specification for ‘ssh’


--------------------------------------------------------------------------------
/Applications/Emacs-25.1.app/Contents/MacOS/Emacs -nw -Q -l ./test-tramp-wrong-method-specification-for-ssh-issue.el --batch
Tramp: Opening connection for myvps using ssh...
Opening connection for myvps using ssh... \
Tramp: Sending command ‘exec ssh   -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none myvps’
Tramp: Waiting for prompts from remote shell...
Waiting for prompts from remote shell... \
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘myvps’
Tramp: Opening connection for myvps using ssh...done
Tramp: Inserting ‘/ssh:myvps:/etc/config/network’...
Inserting ‘/ssh:myvps:/etc/config/network’ \
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: nil, command: "test -c /dev/zero && od -v -t x1 -A n </dev/null && busybox awk '{}..."
[DEBUG] ret: nil, command: "test -c /dev/stdout"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG][tramp-find-inline-encoding] return: nil, args: (["ssh" nil "myvps" "/etc/config/network" nil])
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "base64 </dev/null"
[DEBUG] ret: nil, command: "openssl enc -base64 </dev/null"
[DEBUG] ret: nil, command: "mimencode -b </dev/null"
[DEBUG] ret: nil, command: "mmencode -b </dev/null"
[DEBUG] ret: nil, command: "recode data..base64 </dev/null"
[DEBUG] ret: nil, command: "test -c /dev/zero && od -v -t x1 -A n </dev/null && busybox awk '{}..."
[DEBUG] ret: nil, command: "test -c /dev/stdout"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG] ret: nil, command: "uuencode xxx </dev/null"
[DEBUG][tramp-find-inline-encoding] return: nil, args: (["ssh" nil "myvps" "/etc/config/network" nil])
Tramp: Inserting ‘/ssh:myvps:/etc/config/network’...failed
Wrong method specification for ‘ssh’
2 个赞

大佬,这个问题是如何解决的,我也遇到了,wrong method specification for ssh,远程目录可以查看,源文件看不了,求解。