We have this policy that the account gets locked if a user tries to login with the wrong password for three times.

Now if I mistype my password when connecting via tramp, it will try to login several times, locking my account immediately.

I could not find a way to disable multiple login attempts. Is there a way to tell tramp to try only once?

2 Answers 2


Tramp should automatically recognise a wrong password error and prompt you for a new password. If it doesn't, it probably indicates that the remote host is using a weird string to report password errors.

Please set the variable tramp-verbose to 6, then check the *debug tramp/whatever* buffer to find out what error message the host is checking. Then customise the variable tramp-wrong-password-reject to match it.


You can try pressing C-g right after the first login attempt fails.

Then clean the connection with M-x tramp-cleanup-this-connection before trying to login again.

  • It's way faster than my reaction time...
    – Beginner
    Commented Apr 23, 2015 at 15:31
  • I don't understand. Do you mean it is not working for you? Commented Apr 23, 2015 at 16:14
  • It does a series of futile login attempts within about second, no way to notice and press some keys in that time frame at least for me.
    – Beginner
    Commented Apr 23, 2015 at 16:16

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.