Skip to content

openssh: add SFTP server to large flash targets#29022

Open
Lanchon wants to merge 1 commit intoopenwrt:masterfrom
Lanchon:add-sftp-server
Open

openssh: add SFTP server to large flash targets#29022
Lanchon wants to merge 1 commit intoopenwrt:masterfrom
Lanchon:add-sftp-server

Conversation

@Lanchon
Copy link
Copy Markdown

@Lanchon Lanchon commented Mar 30, 2026

This will integrate SFTP server support into most images by default. SFTP is the default protocol used by the scp client since OpenSSH 9.0.

This change will activate openssh-sftp-server in buildbot by defalut for targets with large flash. For those targets, dropbear is already being built with support for an external SFTP server binary.

The package size is around 55 to 60 KB depending on target.


@hauke i think you make these decisions.

OpenSSH 9.0 (released in 2022) changed the way scp works, from using the legacy scp/rcp protocol to using the sftp protocol by default. (*)

The scp protocol has long been discouraged in favor of sftp given its various limitations. sftp on the other hand fully allows mounting remote file systems, and i had always found it indispensable for administering my openwrt boxes.

At least for large flash devices, openssh-sftp-server brings in no extra dependencies. Given that openssh broke scp on openwrt, and ssh/scp being such basic necessity, shouldn't openssh-sftp-server be included by default on devices with large flash?

(*) The old scp behavior can be invoked with the -O flag.


📦 Package Details

Maintainer: @hnyman
(You can find this by checking the history of the package Makefile.)

Description:


🧪 Run Testing Details

  • OpenWrt Version:
  • OpenWrt Target/Subtarget:
  • OpenWrt Device:

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

@hnyman
Copy link
Copy Markdown
Contributor

hnyman commented Mar 30, 2026

No idea where you got me as the maintainer...
The Makefile lists MAINTAINER:=Peter Wagner <tripolar@gmx.at> but he has been long absent.

To the main point:

  • If this would be included into the default images by the buildbot, then the package should be moved to the main OpenWrt repo, I think.
  • I understand your reasoning. I include this to all my own builds, just for the reason to have the scp functionality in place (even without -O)

@Lanchon
Copy link
Copy Markdown
Author

Lanchon commented Mar 30, 2026

hey,

No idea where you got me as the maintainer...

sorry! because you made the latest openssh commit. (instructions say "You can find this by checking the history of the package Makefile".)

If this would be included into the default images by the buildbot, then the package should be moved to the main OpenWrt repo, I think.

no, i also used to think that. however this is only true for packages required by bare-bones builds (for each target). on top of those the buildbot can add optional packages by default, and these can live in the packages repo.

for example, owut is now included in all large flash buildbot builds by default, although it lives in the packages repo.

This will integrate SFTP server support into most images by default.
SFTP is the default protocol used by the scp client since OpenSSH 9.0.

This change will activate openssh-sftp-server in buildbot by defalut
for targets with large flash. For those targets, dropbear is already
being built with support for an external SFTP server binary.

The package size is around 55 to 60 KB depending on target.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
@Lanchon
Copy link
Copy Markdown
Author

Lanchon commented Mar 30, 2026

[fail] Commit subject must be <= 60 (and should be <= 50) characters long

agghhh! got me again, sorry!

@Lanchon Lanchon changed the title openssh: add SFTP server support to images for large flash targets openssh: add SFTP server to large flash targets Mar 30, 2026
@brada4
Copy link
Copy Markdown
Contributor

brada4 commented Mar 31, 2026

You can kind of alias scp='scp -O' on a client. No 100kB change on the router needed.
It is an fallacy that >8MB flash is large.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants