Alexei Srour <[email protected]> writes:

> Hi Michael,

Hi Alexei,

> 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.

Yes. Perhaps, the Tramp manual shall be more precise that this is a
problem on MS 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.

I believe the problem happens with every authentication request from the
sshd server. So if we fix it for a password request, it shall work also
for other request, like OTP verification.

> 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 followed the Fedora instructions on
<https://fedoramagazine.org/two-factor-authentication-ssh-fedora/>. Perhaps
I did something wrong, or the instructions are too old.

But since I believe we need to fix sshd password requests first, it
isn't such important to me any longer.

>> 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?

No, that's OK. sshx/scpx seem to work with authentication requests on
all platforms but MS Windows. I vaguely remember problems with
cygwin. But that was reported years ago, and I haven't a cygwin system
for test.

> Again, sorry for the delay and thanks for the help.
>
> Regards,
> Alexei

Best regards, Michael.

Reply via email to