Trying to upload via sftp and getting protocol disabled. I know this is based on a Ubuntu bug, and went through the steps to reinstall/update libssh2 and curl on the system. Reinstalled RCurl package from source and it is not recognizing the update on the system, and I don't know why.
$ curl -V
curl 7.65.3 (x86_64-pc-linux-gnu) libcurl/7.65.3 OpenSSL/1.1.1 zlib/1.2.11 libssh2/1.9.0-20190820
Release-Date: 2019-07-19
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtp
Features: AsynchDNS HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets
That's shows sftp as one of the protocols
in R though, it does not include sftp, and the curl version does not match.
> libcurlVersion()
[1] "7.58.0"
attr(,"ssl_version")
[1] "OpenSSL/1.1.1"
attr(,"libssh_version")
[1] ""
attr(,"protocols")
[1] "dict" "file" "ftp" "ftps" "gopher" "http" "https" "imap"
[9] "imaps" "ldap" "ldaps" "pop3" "pop3s" "rtmp" "rtsp" "smb"
[17] "smbs" "smtp" "smtps" "telnet" "tftp"
and
> curl::curl_version()
$version
[1] "7.58.0"
$ssl_version
[1] "OpenSSL/1.1.1"
$libz_version
[1] "1.2.11"
$libssh_version
[1] NA
$libidn_version
[1] "2.0.4"
$host
[1] "x86_64-pc-linux-gnu"
$protocols
[1] "dict" "file" "ftp" "ftps" "gopher" "http" "https" "imap"
[9] "imaps" "ldap" "ldaps" "pop3" "pop3s" "rtmp" "rtsp" "smb"
[17] "smbs" "smtp" "smtps" "telnet" "tftp"
$ipv6
[1] TRUE
$http2
[1] TRUE
$idn
[1] TRUE
Server : Using Ubuntu 18.04.2 LTS
Error message I am getting in my code using RCurl::ftpUpload()
* Protocol "sftp" not supported or disabled in libcurl
* Closing connection -1
Error in function (type, msg, asError = TRUE) :
Protocol "sftp" not supported or disabled in libcurl
Doubly odd, is that this box is my RStudio Server. If I run the script manually, from the web interfact it works. This error only occurs when running from Ubuntu shell, as it needs to be a chron job.