tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TRAMP + Sudo infinite loop weirdness


From: Vlad
Subject: Re: TRAMP + Sudo infinite loop weirdness
Date: Thu, 11 Mar 2021 17:14:40 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

Many thanks! This info solved my problem.
It seems my shell "fish" was at fault. I did not catch unto this, because it worked when connecting as non-sudo.

Initially I changed my shell from fish, back to csh. This solved the issue.
Then I read up in the tramp manual, that /bin/sh is requested, when connecting via the "sshx" or the "plink" method. Switching the command from ssh to sshx finally solved the problem properly. I now have my fish shell back and sshx properly requests /bin/sh. Edit as sudo now works properly.

Best regards,

Vlad


On 11/03/2021 14:50, Michael Albinus wrote:
Vlad <gnu@frost.kiwi> writes:

Dear tramp-devel Team,
Hi Vlad,

I'm having a though time editing files with emacs (GNU Emacs 27.1 (build
1, x86_64-pc-linux-gnu) of 2020-09-26) as sudo on my server (FreeBSD 12).
The SSH connection is established via ssh-keys.

Editing files via Tramp (find-file "ssh:user@machine:/") everything 100%
works, however, doing (find-file "ssh:user@machine|sudo:root@machine:/")
does not work *most of the time*. One out of 20 of entering this
find-file command, I get the remote password prompt to enter my remote
user's password to get a tramp connection with sudo privileges. However,
most of the time, Tramp produces trash inputs into the password field by
itself, instead of giving me the password prompt. As a result, either
nothing happens or emacs get's stuck in a loop and C-g crashes emacs.

"tramp-verbose 10" reveals the culprit being a repeated series of "exec
sudo -u root -s -H -p P""a""s""s""w""o""r""d"": /bin/sh"
"^[[?2004lPassword:" "Sorry, try again." instead of giving me the
password prompt.

Full verbose log attached to this mail.

Anything I can do to stop tramp from acting up?
You have nasty escape seqences in your shell output, like this:

--8<---------------cut here---------------start------------->8---
[?2004hflan@flandre /u/h/flan>
--8<---------------cut here---------------end--------------->8---

2004h, for example, stands for bracketed paste mode. Can you convince
your remote shell to suppress it? The Tramp manual speaks about
techniques.

Best regards,

Vlad
Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]