curl / Mailing Lists / curl-library / Single Mail

curl-library

Transfering a file via SFTP returns error 51 ()

From: Daniele Giglio <dg_at_spitalia.it>
Date: Wed, 17 Jan 2018 10:17:25 +0100

Hello to everybody,
I’m encountering some problems using an old version of cURL, but I’m not sure if the problem could be in a misconfigured server. Can you please help me in understand where the error could lie?

I’ve made the following tries:

curl -T $FILE -s -S -f -H Expect: --disable-epsv --ftp-skip-pasv-ip --disable-eprt --connect-timeout 120 -vvv --key ~/.ssh/private_rsa --insecure --pubkey ~/.ssh/pubid_test -u user:pwd sftp://X.X.X.X:22/FTP_IN/

It returns this error:

* About to connect() to X.X.X.X port 22 (#0)
* Trying X.X.X.X... connected
* Connected to X.X.X.X (X.X.X.X) port 22 (#0)
* SSH MD5 fingerprint: 3bab51edd426db27f3d06d3cd643200d
* SSH host check: 2, key: <none>
* Closing connection #0
* Error in the SSH layer
curl: (79) Error in the SSH layer

This other try returns this error:

curl -T $FILE -s -S -f -H Expect: --disable-epsv --ftp-skip-pasv-ip --disable-eprt --connect-timeout 120 -vvv --key ~/.ssh/private_rsa -u user:pwd sftp://X.X.X.X:22/FTP_IN/

* About to connect() to X.X.X.X port 22 (#0)
* Trying X.X.X.X... connected
* Connected to X.X.X.X (X.X.X.X) port 22 (#0)
* SSH MD5 fingerprint: 3bab51edd426db27f3d06d3cd643200d
* SSH host check: 2, key: <none>
* Closing connection #0
* SSL peer certificate or SSH remote key was not OK
curl: (51) SSL peer certificate or SSH remote key was not OK

Here you are what cURL -V returns:

curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.21 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-01-17