I am using Ubuntu 16.04, running PHP7.0 and Magento2. I have installed a Magento Plugin which requires CURL SFTP to send an XML product feed to a remote server.
I noticed that the default CURL installed with Ubuntu does not support SFTP, so I followed instructions to re-compile it on the server, and now has support.
~$ curl -V
curl 7.62.0 (x86_64-pc-linux-gnu) libcurl/7.62.0 OpenSSL/1.1.1 libssh2/1.5.0
Release-Date: 2018-10-31
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL TLS-SRP UnixSockets HTTPS-proxy
However, I did not realize that PHP has its own CURL library, and I don't know how to modify it to provide SFTP support.
I tried issuing "$ sudo apt-get install php7.0-curl" and it results in:
~$ sudo apt-get install php7.0-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.0-curl is already the newest version (7.0.32-4+ubuntu16.04.1+deb.sury.org+1).
However, this is not what is reported when I run phpinfo(). It is a different version and also SFTP protocol is not listed.
curl
cURL support enabled
cURL Information 7.47.0
Age 3
Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, smb, smbs, smtp, smtps, telnet, tftp
I'm not sure what next step to take is..