Hi Michael, Sorry for the wait, I'll answer your questions shortly. First I'll share some findings.
I had the opportunity to access a Mac and a Windows 10 computer to test Tramp connections on them. I found that scpx and sshx worked perfectly on the Mac, regardless of whether there was a password or OTP prompt, but both Windows machines failed at the point where I'd expect an input prompt for both password or OTP. Since it was only the Windows machines that hung and failed to acknowledge any prompt, I'm convinced that it's something specific to how Tramp or Emacs interacts with Windows. It's been time consuming, so I haven't had a chance to be completely rigorous and document all my findings. I'm happy to standardise the process (i.e. match versions of Tramp & Emacs, check configs for SSHD, PAM, and Google Authenticator) and provide traces, but only if you request it since I anticipate it will take a while. The high level summary is that I tested every combination of scpx and sshx methods against connections with just a password login, just an OTP login (with password key), and both password and OTP login, across all three of my machines - Windows 10, Windows 11, and Mac. On to your questions: > Perhaps (likely?) it is a tty issue. How do you start Emacs on your MS > Windows? Have you tried to start from a shell? I've been invoking Emacs from Windows Terminal with `emacs -Q -l C:/Users/name/AppData/Roaming/.emacs.d/elpa/tramp-2.8.0.4/tramp-autoloads.el --eval "(setq tramp-verbose 10 tramp-debug-to-file t)" /scpx:<user>@<ip address>#<port>:~/`. I've been running the GUI as that's what's available for Windows. > I have tried to install google-authenticator on my Fedora 43 laptop, but > it fails to cooperate. Accessing this laptop via ssh doesn't show the > "Verification code:" prompt. Do you have a short recipe how to do? I unfortunately never got around to documenting my own setup, but I recall making use of PAM as well as running into unhelpful issues with time sync with ntpd. That said, the ArchWiki's entry on Google Authenticator seems accurate to my memory and matches some of my configurations, so perhaps that's worth reviewing for either you or Joel: https://wiki.archlinux.org/title/Google_Authenticator > I've played further with this. Well, it seems like it is a known > issue. In the Tramp manual, we have I'll counter that scpx/sshx both worked on the Mac I tested on. Is this worth investigating further? Again, sorry for the delay and thanks for the help. Regards, Alexei On Mon, Nov 24, 2025 at 2:03 AM Michael Albinus <[email protected]> wrote: > Hi Alexei, > > > Perhaps (likely?) it is a tty issue. How do you start Emacs on your MS > > Windows? Have you tried to start from a shell? > > I've played further with this. Well, it seems like it is a known > issue. In the Tramp manual, we have > > --8<---------------cut here---------------start------------->8--- > *Note* that ‘sshx’ does not bypass authentication questions. For > example, if the host key of the remote host is not known, ‘sshx’ > will still ask "Are you sure you want to continue connecting?". > TRAMP cannot handle such questions. Connections will have to be > setup where logins can proceed without such questions. > --8<---------------cut here---------------end--------------->8--- > > See (info "(tramp) Inline methods") > > I suppose the question for the verification code falls into this > category. Perhaps you try the "plink" method instead of "sshx"? > > Best regards, Michael. >
