> MM <[hidden email]> 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.
>

Thank you, the invocation of plink works correctly.

I just however realized that the server doesn't allow me to actually
run a shell because my user's shell is noshell!!!!!
However SFTP is allowed.
Is there a way to use tramp for file transfers uniquely, ie visit the
remote files, edit, and on saving, it sends them back to server?

Regards,
MM




--
View this message in context: 
http://emacs.1067599.n5.nabble.com/tramp-2-26-emacs-24-3-plink-tp326289p326350.html
Sent from the Gnu - Tramp - Dev mailing list archive at Nabble.com.
_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to