On 7 June 2023 19:25:17 EEST, Allan Streib <[email protected]> wrote:
>My goal is to copy from stdin to a remote system via sftp in a pipeline.
>I thought curl would allow this with its "-T" argument by providing "-"
>as the local filename to transfer, but the result was:
>
>curl: (1) Protocol "sftp" not supported or disabled in libcurl
>
>I tried to search the list archives for any discussion but found none.
>Seems to have been this way for a long time. Is there an alternative?
>
>OpenBSD 7.2 GENERIC.MP#7 amd64
>
>curl 8.0.1 (x86_64-unknown-openbsd7.2) libcurl/8.0.1 LibreSSL/3.6.0 
>zlib/1.2.12 nghttp2/1.49.0
>Release-Date: 2023-03-20
>Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 
>pop3s rtsp smb smbs smtp smtps telnet tftp
>Features: alt-svc AsynchDNS HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM 
>NTLM_WB SSL threadsafe UnixSockets
>
>Allan
>

Curl is built without sftp or scp support; my guess is because "why would you?" 
and "with libssh or libssh2?", but that doesn't change how it's currently built.

You can do what I did: grab the ports tree, update net/curl/Makefile to 
configure --with-libssh (and add libssh as a dependency), make package and make 
install. 
Package updates are annoying, but I've learnt to live with it.

I can share my diff if you're interested to build it yourself. I'm not near a 
PC right now.

Reply via email to