tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp 2.26 emacs 24.3 plink


From: Michael Albinus
Subject: Re: tramp 2.26 emacs 24.3 plink
Date: Tue, 08 Jul 2014 17:04:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

MM <address@hidden> 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:address@hidden:/path/to/file".

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]