Re: Question about net/curl and SFTP

2023-06-08 Thread Christian Weisgerber
"Allan Streib": > curl: (1) Protocol "sftp" not supported or disabled in libcurl > > I tried to search the list archives for any discussion but found none. There has been little demand for SFTP support in curl, and it would add yet another dependency. -- Christian "naddy" Weisgerber

Re: Question about net/curl and SFTP

2023-06-08 Thread Allan Streib
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

Re: Question about net/curl and SFTP

2023-06-08 Thread Stuart Henderson
On 2023/06/07 12:47, Allan Streib wrote: > On Wed, Jun 7, 2023, at 12:37, Vlad Meșco wrote: > > > 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. > > Yes, that's fine, I

Re: Question about net/curl and SFTP

2023-06-07 Thread Abel Abraham Camarillo Ojeda
On Wed, Jun 7, 2023 at 12:35 PM Vlad Meșco wrote: > On Wed, Jun 07, 2023 at 12:19:19PM -0600, Abel Abraham Camarillo Ojeda > wrote: > > On Wed, Jun 7, 2023 at 11:48 AM Allan Streib > wrote: > > > > > On Wed, Jun 7, 2023, at 12:37, Vlad Meșco wrote: > > > > > > > Curl is built without sftp or

Re: Question about net/curl and SFTP

2023-06-07 Thread Allan Streib
On Wed, Jun 7, 2023, at 13:35, Vlad Meșco wrote: > On Wed, Jun 07, 2023 at 12:19:19PM -0600, Abel Abraham Camarillo Ojeda wrote: >> You can also use plain ssh with something like: >> >> program | ssh -n user@host 'cat > /route/to/destfile' > > I agree with Abel, that's the best choice if you can

Re: Question about net/curl and SFTP

2023-06-07 Thread Vlad Meșco
On Wed, Jun 07, 2023 at 12:19:19PM -0600, Abel Abraham Camarillo Ojeda wrote: > On Wed, Jun 7, 2023 at 11:48 AM Allan Streib wrote: > > > On Wed, Jun 7, 2023, at 12:37, Vlad Meșco wrote: > > > > > Curl is built without sftp or scp support; my guess is because "why > > > would you?" > > > > I

Re: Question about net/curl and SFTP

2023-06-07 Thread Abel Abraham Camarillo Ojeda
On Wed, Jun 7, 2023 at 11:48 AM Allan Streib wrote: > On Wed, Jun 7, 2023, at 12:37, Vlad Meșco wrote: > > > Curl is built without sftp or scp support; my guess is because "why > > would you?" > > I would just use the sftp utility itself, except it doesn't allow > reading the standard input for

Re: Question about net/curl and SFTP

2023-06-07 Thread Allan Streib
On Wed, Jun 7, 2023, at 12:37, Vlad Meșco wrote: > Curl is built without sftp or scp support; my guess is because "why > would you?" I would just use the sftp utility itself, except it doesn't allow reading the standard input for the data to transfer. curl does, thus my attempt to use it in

Re: Question about net/curl and SFTP

2023-06-07 Thread Theo de Raadt
Vlad Meșco wrote: > On 7 June 2023 19:25:17 EEST, Allan Streib 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)

Re: Question about net/curl and SFTP

2023-06-07 Thread Vlad Meșco
On 7 June 2023 19:25:17 EEST, Allan Streib 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

Question about net/curl and SFTP

2023-06-07 Thread Allan Streib
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