I am trying to use Tramp to log into a server that has no SSH keys, just a password. Unfortunately, upon execution of my /ssh:[email protected]:~/ command, there is no password prompt and the minibuffer says Sending password, and fails to login. How can I get Tramp to prompt me for a password? Or, how can I configure Tramp to log into this server that has no SSH keys and just a password?

I can SSH into the server via terminal just fine with ssh [email protected], where the password prompt is:

[email protected]'s password:

Unless I enter my password, there is no other output in the terminal.

Here is the output in my *Messages* buffer:

Tramp: Opening connection for [email protected] using ssh...
Tramp: Sending command `exec ssh -l root  -e none'

Tramp: Waiting for prompts from remote shell
Tramp: Sending password
Tramp: Sending command `exec ssh -l root  -e none'
Tramp: Opening connection for [email protected] using ssh...done

and after setting a verbose output using (setq tramp-verbose 10), here is the output into my *debug tramp/ssh [email protected]* buffer:


Note that I get the same results when using emacs -q.

My M-x tramp-version is 2.2.6-24.3, running on Ubuntu 14.04.

Any help would be appreciated, or even a description of the logs. I am confused because Tramp seems to be sending some kind of default password without prompting me, even when run with emacs -q.


I tried setting tramp-password-prompt-regexp with the following:

          '("passphrase" "Passphrase"
            ;; English
            "password" "Password"
            ;; Deutsch
            "passwort" "Passwort"
            ;; Français
            "mot de passe" "Mot de passe") t)
        ".*:\0? *"))

which is ^.*\(Mot de passe\|Pass\(?:phrase\|wor[dt]\)\|mot de passe\|pass\(?:phrase\|wor[dt]\)\).*:^@ when evaluated with (message tramp-password-prompt-regexp).

and here is the updated output from *debug tramp/ssh [email protected]*:

(lines 1-44) http://pastebin.com/99w6LbyX (lines 45-88) http://pastebin.com/2LrDYzNk

  • 1
    Set verbosity a little higher and then take a look at the logs: (setq tramp-verbose 10)
    – user2005
    Commented Mar 20, 2015 at 10:04
  • I updated my question above. It didn't add much extra output, unfortunately. Thanks for the tip; let me know if I can do more to help.
    – modulitos
    Commented Mar 20, 2015 at 10:23
  • You should also have buffer with a name like *debug tramp* or similar. This should tell you a little more. TRAMP does not write the debug messages to *Messages*.
    – user2005
    Commented Mar 20, 2015 at 11:03
  • @rekado thanks, I updated the *debug tramp* buffer output. I'm still not sure why Tramp doesn't offer a password prompt.
    – modulitos
    Commented Mar 20, 2015 at 11:39
  • be sure to take a look at the manual: gnu.org/software/emacs/manual/html_node/tramp/… It looks like TRAMP fails to find the remote password prompt. Check the value of tramp-password-prompt-regexp and the actual password prompt on the remote.
    – user2005
    Commented Mar 20, 2015 at 12:46

3 Answers 3


If the account you're trying to log in with uses some weird fancy shell prompt, then there is a good chance that this is what makes tramp trip.

One way to test it: Log in as root, then enter

PS1="> "

(that's a normal, standard shell (ZSH, BASH, younameit) prompt, one that tramp will understand) then switch to the user account, and launch emacs -q (to make sure that your .emacs is not causing this mess) and try to C-x C-f /sudo:root@localhost:/etc/hosts and see what's what.

You can (not recommended) also customize the regexp that defines what tramps expects :

M-x customize-variable RET tramp-terminal-prompt-regexp

My approach :

  1. Make sure The variable tramp-terminal-type is set to "dumb"

M-x customize-variable RET tramp-terminal-type

  1. Test that in your .*shrc and serve the correct prompt :
case "$TERM" in
    PS1="> "
    PS1="my fancy multi-line \n prompt > "
    PS1="> "
  • I understood this could have been the problem by looking at Tramp's code, which attempts to interpret the login prompt in all the languages of the world. No way it can detect a modern prompt, and in fact a fast search led to you. However, to detect SSH, I think it could be better the more specific if [ -n "$SSH_CLIENT" ] ....
    – antonio
    Commented Aug 15, 2022 at 0:30

In short, I had an incorrectly configured ~/.authinfo that causes Tramp to automatically send a default password (which was the incorrect password). Deleting ~/.authinfo resolved my issue.

An incorrectly configured ~/.netrc can also cause this same issue. So make sure to check whether a .authinfo or .netrc file exists, and ensure that it is not submitting an incorrect password as the default.

@MichaelAlbinus and the Tramp-dev team helped me resolve this issue. After submitting my verbose log output to the Tramp-dev team, I received this response:

Tramp sends a password, but a wrong one:

> 19:58:17.561007 tramp-send-command (6) # exec ssh -l root  -e none
> 19:58:19.457169 tramp-accept-process-output (10) #
> [email protected]'s password:
> 19:58:19.463921 tramp-action-password (3) # Sending password
> 19:58:21.526264 tramp-process-actions (6) #
> [email protected]'s password:
> Received disconnect from 2: Too many authentication failures for root

Deleting my .authinfo file brought back Tramp's password prompt. It was my error for not having Gnus Authinfo properly configured.

Unfortunately my complete logs are too long to attach or pastebin here, but I hope this is enough of a summary to help others out.


My issue with tramp not working (only C-g did anything) was a too fancy readline configuration for vi-cmd-mode-string and vi-ins-mode-string. I added:

$if term=dumb
set show-mode-in-prompt off

to my .inputrc which solved it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.