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: Michael Albinus
Subject: Re: TRAMP + Sudo infinite loop weirdness
Date: Thu, 11 Mar 2021 14:50:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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]