[Top][All Lists]

[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: Mon, 15 Sep 2014 16:42:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

MM <address@hidden> writes:

> I usually restart Emacs.

That's good, but not as good as `tramp-cleanup-all-connections'. Tramp
caches connection properties, which survive an Emacs restart.

> 1. There are appear to be repeated retries to read the prompt. Is
> there a way to increase the time between retries?

No, Tramp doesn't read your prompt several times. It checks it for
several regexps, in order to find out where we are.

> 2. After the successful log in to the final host, tramp sends
> _another_ plink command towards myhost again, which just fails. It's
> not needed. This makes the connection to myhost closed, and back to
> the prompt on the gateway

This shouldn't happen, and this doesn't happen in stock configuration. I
believe you don't need the "myplink" entry in tramp-methods. I recommend
to throw it away, and to use plink as it is.

The only change from you I have seen is that you give a hard-coded
password. Tramp doesn't do it ever, for security reasons. You could
always enter it interactively, or you could write it into your
~/.authinfo file, if you don't want to type it.

And no, I have no idea why Tramp calls plink twice in your environment.

> 3. A 2nd successful login to myhost, and then tramp seems to do a
> couple of checks on available commands, though it erases the PATH
> variable before that.

It does it always, for sanity. Tramp dislikes private versions of
standard POSIX programs :-)

> 4. finally, it tries to locate the file I've asked for, but adds the C
> windows drive. Indeed, my home directory is actually the same on my
> windows box and the remote solaris server.

Hmm, you run Tramp 2.2.6. I remember a bug with the volume letter, which
was fixed in 2.2.8. Maybe it is the same here?

> 5. then, it attempts to find the 'ls' command

This seems also be caused by the misplaced volume letter.

In fact, first we shall fix the double call of "plink". Then let's see
what happens.

> Inline below, my .emacs again.... Do I need the proxies alist still?
> (add-to-list 'tramp-methods
>   '("myplink"
>     (tramp-login-program        "plink")
>     (tramp-login-args           (("-l" "%u") ("-pw" "mypass") ("-ssh") 
> ("%h")))
>     (tramp-remote-shell         "/bin/bash")
>     (tramp-remote-shell-args    ("-c"))
>    ))
> (setq tramp-default-method "myplink")

This I recommend to throw away.

>  (setq tramp-password-end-of-line "\r\n")

Is this needed? I believe not.

> (add-to-list 'tramp-default-proxies-alist
>   '("myhost" nil "/myplink:address@hidden:"))

Likely not needed.

> (eval-after-load "tramp-sh"
>  '(add-to-list 'tramp-actions-before-shell
>               '(my-tramp-prompt-regexp my-tramp-action)))

Since you require tramp-sh already, a simple add-to-list (w/o
eval-after-load) should be sufficient.

Best regards, Michael.

reply via email to

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