[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp 2.26 emacs 24.3 plink
From: |
MM |
Subject: |
Re: tramp 2.26 emacs 24.3 plink |
Date: |
Fri, 12 Sep 2014 14:59:23 +0100 |
On 12 September 2014 13:53, Michael Albinus <address@hidden> wrote:
> MM <address@hidden> writes:
>
>> I was talking about the next step, actually opening the remote file
>
> I was talking about this as well. There shouldn't be any ftp in the way.
>
> Please try with a fresh emacs.
>
> Best regards, Michael.
I apologize if I don't understand, and thanks for your patience.
I uncommented the myplink defaul method. I will post my entire .emacs
at the end of this email.
I realized the prompt I get from the gateway is not just 'Host:'as I
mentioned before, it is actuall:
Using username "user".
Last login: Fri Sep 12 09:47:46 2014 from <ipaddress>
Host:<right after the colon, the terminal is prompting me
for a hostname>
This is when I run the plink client as so from cmd.exe:
plink -l user -pw mypassword -ssh gateway
which is the exact command line of the subprocess emacs launched.
C-x C-f /host:filename
gives :
Tramp: Opening connection for host using myplink...
Tramp: Sending command `plink -l user pw mypasswd ssh gateway && exit || exit'
Tramp: Waiting for prompts from remote shell [2 times]
which launches the plink subprocess, and then it hangs.
I assume the regexp-quote would have to change somehow.
What about the default-proxies-alist?
Here is my entire .emacs: (emacs correctly runs it)
(require 'tramp)
(require 'tramp-sh)
(add-to-list 'tramp-methods
'("myplink"
(tramp-login-program "plink")
(tramp-login-args (("-l" "%u") ("-pw" "mypasswd")
("-ssh") ("%h")))
(tramp-remote-shell "/bin/bash")
(tramp-remote-shell-args ("-c"))
))
(setq tramp-default-method "myplink")
(setq tramp-password-end-of-line "\r\n")
(add-to-list 'tramp-default-proxies-alist
'("host" nil "/myplink:address@hidden:"))
(defconst my-tramp-prompt-regexp
(concat (regexp-quote "Host:") "\\s-*")
"Regular expression matching my login prompt question.")
(defun my-tramp-action (proc vec)
"Enter the host name in order to give a correct answer."
(save-window-excursion
(with-current-buffer (tramp-get-connection-buffer vec)
(tramp-message vec 6 "\n%s" (buffer-string))
(tramp-send-string vec "gateway"))))
(eval-after-load "tramp-sh"
'(add-to-list 'tramp-actions-before-shell
'(my-tramp-prompt-regexp my-tramp-action)))
- Re: tramp 2.26 emacs 24.3 plink, MM, 2014/09/10
- Re: tramp 2.26 emacs 24.3 plink, MM, 2014/09/10
- Re: tramp 2.26 emacs 24.3 plink, Michael Albinus, 2014/09/10
- Re: tramp 2.26 emacs 24.3 plink, MM, 2014/09/10
- Re: tramp 2.26 emacs 24.3 plink, Michael Albinus, 2014/09/12
- Re: tramp 2.26 emacs 24.3 plink, MM, 2014/09/12
- Re: tramp 2.26 emacs 24.3 plink, MM, 2014/09/12
- Re: tramp 2.26 emacs 24.3 plink, Michael Albinus, 2014/09/12
- Re: tramp 2.26 emacs 24.3 plink, MM, 2014/09/12
- Re: tramp 2.26 emacs 24.3 plink, Michael Albinus, 2014/09/12
- Re: tramp 2.26 emacs 24.3 plink,
MM <=
- Re: tramp 2.26 emacs 24.3 plink, Michael Albinus, 2014/09/13
- Re: tramp 2.26 emacs 24.3 plink, MM, 2014/09/15
- Re: tramp 2.26 emacs 24.3 plink, Michael Albinus, 2014/09/15
- Re: tramp 2.26 emacs 24.3 plink, MM, 2014/09/15
- Re: tramp 2.26 emacs 24.3 plink, Michael Albinus, 2014/09/15
- Re: tramp 2.26 emacs 24.3 plink, MM, 2014/09/15
- Re: tramp 2.26 emacs 24.3 plink, Michael Albinus, 2014/09/15
- Re: tramp 2.26 emacs 24.3 plink, MM, 2014/09/15
- Re: tramp 2.26 emacs 24.3 plink, Michael Albinus, 2014/09/15
- Re: tramp 2.26 emacs 24.3 plink, Michael Albinus, 2014/09/15