简体   繁体   中英

Emacs Tramp hangs on 'enter' key after inputing password

I tried Cx Cf '/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 Cx Cf '/sudo:root@localhost:/' succeded, Cx Cf '/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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM