Alexei Srour <[email protected]> writes: > Hello,
Hi Alexei, > I've been having difficulty using Tramp to access files on a server > protected by an OTP, causing a considerable hang until timeout. I've > suspected a regex problem and attempted to edit relevant settings to > no avail, and I'm concerned that my environment may be the problem. > All details to follow: > > My local machine is Windows 11, running Emacs 29.4, using Tramp > 2.8.0.4. My remote server is a Linux box that's using Zsh with > Google-Authenticator for the OTP with a default prompt. Only > passwordless SSH connections with a key and OTP are allowed. > > I've successfully used Tramp (with default configurations) to connect > to my server *without* OTP enabled. As I am running on a Windows > machine, I have to use the `scpx` or `sshx` methods to force pseudo > TTY allocation with the `-t -t` flags, and I have further confirmed > that `ssh -l <user> -p <port> -e none -t -t -o RemoteCommand="/bin/sh > -i" <ip address>` works both within Emacs EShell and Emacs Shell, as > well as from an external Windows Terminal instance. > > Once OTP is enabled, Tramp, Emacs EShell, and Emacs Shell all hang > where I'd expect the OTP prompt, but Windows Terminal continues to > connect fine after inputting the OTP. Inspecting the SSHD logs, it > acknowledges the incoming connection prior to authenticating with an > OTP, running `ssh -vvv ...` and inspecting the debug2 messages show > `input_userauth_info_req: num_prompts 1` which is the very same > message I receive before the OTP prompt, but Tramp, Emacs Eshell, and > Emacs Shell all hang at this stage. Inspecting the debug buffer > (`tramp-verbose` is 6) has the same message looped, over 3 million > lines of this: > > I have attached the full log with anonymised details. Thanks. Some comments: - You don't use Tramp 2.8.0.4 from GNU ELPA. Instead you use (first line in the log) --8<---------------cut here---------------start------------->8--- ;; Emacs: 29.4 Tramp: 2.6.3 -*- mode: outline; coding: utf-8; -*- --8<---------------cut here---------------end--------------->8--- Please check your settings, and activate Tramp 2.8.0.4. - You have used tramp-verbose 6. This is usually OK, but it doesn't show us the contents of the Tramp connection buffer. Pls use tramp-verbose 10. You don't need to wait until the timeout appears, if there is no connection after ~30 sec, cancel the connection with ^G. > All in all, I'm stuck and unsure how to proceed further. What more can > I do? Any help will be greatly appreciated. Pls adapt your test accordingly, and send a new trace. Best regards, Michael.
