3

I'm using IBM's Data Explorer to import certain data, but am getting this error:

Protocol sftp not supported or disabled in libcurl.

So from Red Hat I manually ran the command:

curl -user sftp://hostname.com/~/filename.csv

But got this error:

curl: (51) SSL peer certificate or SSH remote key was not OK

To see if SFTP is supported I ran curl -V and got following:

curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp

Does anyone know what could be wrong? Thanks.

  • Looks like you key is bad. However there is a remote chance that if this worked previously, the server you are attempting to connect to is having a problem. – mdpc Jan 1 '15 at 22:26
  • I've never had it work. How do I make this key good (I'm not even sure which key)? Thanks. – Maryam Jan 1 '15 at 22:27
3

IBM Data Explorer is probably linked against its own private copy of libcurl, so what you see in the system version may not be reflective of the IBM version as far as sftp support.

Normally, curl works like this:

curl -u <username> sftp://hostname.com/~/filename.csv

This assumes you have successfully run ssh hostname.com before, which should have added the right key entry to your ~/.ssh/known_hosts file. If for some reason this is problematic, you could add -k to the curl command line to disable the SSH host key check.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.