reddit / emacs

Need Help: Tramp Asks For Password After Every Character

theoryfiver · 2022-07-18 20:33
If I type \`sshx:\` after typing the colon I'll get prompted for my local machine's password, like I should normally. But then if I try to type the username and IP of the remote machine, every single character I type causes Tramp to ask me for the local machine password again. I have to hit ESC to show the original Tramp prompt again. Typing another character asks for the password again. You get the idea. Has anyone else had this? I don't even know where to look to know what to fix.
vfclists · 2022-07-18 22:29
Try this link - [How to disable emacs from trying to connect to a remote dir as you are typing?](https://www.reddit.com/r/emacs/comments/ukyeb6/how_to_disable_emacs_from_trying_to_connect_to_a/) I haven't got a proper fix yet. What I do is to type the path separately from the `sshx:` or the `ssh:` then remove the space after I finish typing the path.
helm05 · 2022-07-19 04:22
Tramp itself disable its timer while reading password, it is your completion backend that continue calling tramp each time you enter something at prompt. Your completion backend have to stop this by advicing \`tramp-read-password\`, this is what helm does. Try helm-find-files, you will see it doesn't suffer of that problem when prompted for password.
soumya6097 · 2022-07-19 09:47
Have you tried this (setq password-cache-expiry nil) ?
helm05 · 2022-07-19 12:04
This is unrelated to the OP problem.