On Thu, Jun 8, 2023, at 03:01, Stuart Henderson wrote:
> I don't recommend that. It affects the library too, which is used
> by many programs in ports.
>
> There are other ways to do this, including lftp:
>
> $ yes | head -500 | lftp sftp://hostname -e 'put /dev/stdin -o /tmp/file'
>
> and rclone (which works with a wide variety of object storage methods,
> not just sftp):
>
> $ rclone config
> <...go through the interactive "add host config" setup...>
> $ cat .config/rclone/rclone.conf
> [somehost]
> type = sftp
> host = somehost
> $ yes | head -500 | rclone rcat somehost:/tmp/rcattest
>
> It would be helpful if there was something to do this natively in
> openssh; it's very handy for streaming backups to a remote sftp-only
> account without using an intermediate file. It can only work with the
> SFTP protocol (not SCP which requires knowing the file size in advance).

Yes, this is exactly my use case. Backups to a storage server. Thank you for
the other suggestions.

Allan

Reply via email to