Emacs remote file access failing in current snapshot

In 22.03.3, I can use GNU emacs' tramp mode to read/write files through ssh by visiting files like /ssh:root@routername:/etc/config/wireless
But in the a snapshot (SNAPSHOT r22141-dd8a4a8c34), the emacs connection via ssh is failing. I think that something in the OpenWrt shell is closing the connection rather than prompting for input.
The error message shown by Emacs is:

BusyBox v1.36.0 (2023-02-24 11:06:10 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 OpenWrt SNAPSHOT, r22141-dd8a4a8c34
Connection to routername closed.

Anybody else using emacs to remotely access files, and have any idea what might be different in the OpenWrt snapshots compared to 22.03.3?

Is there an updated busybox, anybody aware of changes that might affect this?

Recently had to change use of scp off an ubuntu desktop to OpenWrt to add option:

scp -O

not sure if related.

It seems to be something about the prompting and how the shell started through ssh decides whether to prompt or not. If I force the value of PS1 in the remote shell starting command, such as this:

ssh -l root -e none -t -t OpenWrtHostname /usr/bin/env PS1=\#\$\  /bin/sh -i

then Emacs is happy.

So, I'd guess that something changed in either the ssh server or busybox ash, such that the remote ssh execution does not provide a prompt.

It's hard to diagnose, because running regular ssh command in a macos terminal or linux terminal works fine, but inside Emacs the controlling terminal (or something) is different enough to trigger the new behavior of OpenWrt.

I was debugging/tracing emacs tramp mode today, and found that it requires some packages to be installed on the OpenWrt side. (a) openssh-sftp-server; (b) a tool that can base-64 encode files for transfer: either openssl-utils or coreutils-base64 packages will suffice.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.