Skip to content

Allow sftp to download to a pipe when there is only a single request - #704

Open
hzhongmj wants to merge 1 commit into
openssh:masterfrom
hzhongmj:sftp-lseek
Open

Allow sftp to download to a pipe when there is only a single request#704
hzhongmj wants to merge 1 commit into
openssh:masterfrom
hzhongmj:sftp-lseek

Conversation

@hzhongmj

@hzhongmj hzhongmj commented Aug 4, 2026

Copy link
Copy Markdown

sftp does lseek on local fd which prevents it from working with virtual files that do not support lseek (such as pipe).

This change avoids the lseek if there is only a single request pending, so we can use

sftp -R 1 ... |

to download a file and feed to other programs on the fly.

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.

1 participant