2

I tried C-x C-f '/ssh:user@host:/some/file', after inputing my password, my confirm 'enter' gets no reply.

From OS X to an archlinux machine while ssh works outside emacs.

I set PS1="> ", and use 'emacs -q' in root shell, while C-x C-f '/sudo:root@localhost:/' succeded, C-x C-f '/ssh:user@host:/' also failed.

Tramp-verbose sets to 10 and it gives such info.

12:25:46.141981 tramp-accept-process-output (3) # Opening connection for SOMEUSER@SOMEIP using ssh...done
12:25:46.142129 tramp-get-connection-property (7) # process-name nil
12:25:46.142269 tramp-flush-connection-property (7) # [ssh SOMEUSER SOMEIP nil] (first-password-request)
12:25:46.142420 tramp-flush-connection-property (7) # *tramp/ssh SOMEUSER@SOMEIP* (vector temp-file last-cmd-time)
12:25:46.142670 tramp-get-connection-property (7) # vector nil
12:25:46.143894 tramp-file-name-handler (1) # Interrupt received in operation (file-exists-p /ssh:SOMEUSER@SOMEIP:/home/SOMEUSER/tmp)

I created a new user on the remote machine and succeded connecting with that user(which uses bash),but I wrote 'case dumb' in my main user's .zhsrc and also failed, so I can't get the point.

rve
  • 43
  • 7
  • Which OS are you using? Which OS are you connecting to? Which SSH client are you using? What is your `tramp-default-method`? `M-x customize-variable RET tramp-verbose` may help with diagnosis. – phils Nov 05 '13 at 02:01
  • OS X to archlinux,openssh, method:ssh. I can ssh in shell so I dont' think it's problem about ssh. tramp-verbose only return 3 (defualt level). – rve Nov 05 '13 at 03:54
  • If you increase the verbosity, tramp will tell you more about what's happening. Generally you'll be able to tell what it's trying to do when it hangs. – phils Nov 05 '13 at 03:56
  • Of course I'm assuming that you would have pasted any related messages into the question already, but in case it told you that it was waiting for the remote prompt, see http://stackoverflow.com/questions/6954479/emacs-tramp-doesnt-work – phils Nov 05 '13 at 04:00
  • Thanks for your attention! But it seems tramp-verbose can't give info since emacs hangs on input? – rve Nov 06 '13 at 00:37
  • Well you said you have to enter your ssh password, so clearly tramp *is* doing something. What level have you set `tramp-verbose` to? (try 8, perhaps), and what messages are you getting? (`C-h e` to open the \*Messages\* buffer). – phils Nov 06 '13 at 00:45
  • I'm finding it very difficult to believe that there are no messages from tramp. However you should kill the `*tramp/(connection)*` buffer (for the appropriate value of `(connection)` -- just check your buffer list) before trying to connect, to ensure that tramp doesn't try to reuse the existing connection; that might help. I also note that with verbosity higher than the default 3 it spits out most of its extra information into a separate `*debug tramp/(connection)*` buffer. – phils Nov 07 '13 at 05:21

1 Answers1

5

You said that you wrote case dumb in your .zshrc. Please check if it is similar to the following construct:

if [[ "$TERM" == "dumb" ]]
then
    unsetopt zle
    unsetopt prompt_cr
    unsetopt prompt_subst
    unfunction precmd
    unfunction preexec
    PS1='$ '
fi

I ran into a similar issue. Adding the above block to my .zshrc fixed the issue.

Courtesy: EmacsWiki

Praveen Kumar
  • 1,280
  • 1
  • 8
  • 14