Ash: /usr/libexec/sftp-server: not found when using scp

My WRT router: OpenWrt 21.02.2, r16495-bf0c965af0
(a Xiaomi Redmi AC2100)

Before attempting the sysupgrade to 21.02.3, I backup my system, by:
sysupgrade -b /tmp/backup-${HOSTNAME}-$(date +%F).tar.gz

Since my station, on Devuan Ceres, I use scp command to retrieve this backup, like:

$ scp router:/tmp/backup-***-2022-04-21.tar.gz .
ash: /usr/libexec/sftp-server: not found
scp: Connection closed

Result: I cant get this file. Why?
(On the previous 21.02.1, I dont had this problem)

Install the software on your computer.

This is a consequence of your client machine using a very recent OpenSSH release (9.0 - check for more info), which changes the scp program to use the SFTP protocol under the hood, which vanilla OpenWrt/dropbear installations do not support. To work around the problem on the client side, use the new -O (that is an uppercase letter "o") switch when invoking scp, which will cause it to fall back to the legacy behavior.


@colo: right!

$ scp -O router:/tmp/backup-***-2022-04-21.tar.gz $(pwd)

Thanks! :smiley:
(now, I go to continue the upgrade — I'm happy)

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