MM <[email protected]> writes:

> Hello,

Hi,

> I need to pass the -i option of plink to use a private key file.
> How do I go about that?

You might declare an own method. See tramp-sh.el, where you find
something like

--8<---------------cut here---------------start------------->8---
(add-to-list 'tramp-methods
  '("plink"
    (tramp-login-program        "plink")
    (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") ("%h")))
    (tramp-remote-shell         "/bin/sh")
    (tramp-remote-shell-args    ("-c"))
    (tramp-default-port         22)))
--8<---------------cut here---------------end--------------->8---

You might add a derived method declaration to your .emacs:

--8<---------------cut here---------------start------------->8---
(add-to-list 'tramp-methods
  '("myplink"
    (tramp-login-program        "plink")
    (tramp-login-args           (("-l" "%u") ("-P" "%p")
                                 ("-i" "/path/to/private/key/file")
                                 ("-ssh") ("%h")))
    (tramp-remote-shell         "/bin/sh")
    (tramp-remote-shell-args    ("-c"))
    (tramp-default-port         22)))
--8<---------------cut here---------------end--------------->8---

Then you are able to access a remote file as "/myplink:user@host:/path/to/file".

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to