curl-users
sftp with curl error
Date: Thu, 02 Dec 2010 17:27:46 +0100
Hi list users,
while getting a text file over sftp protocol by curl I have an
error:
[root_at_firewall ~]# ./curl -s -S -f --disable-epsv -v --key test_key
--pubkey test_key.pub -u 'userxxx:'
'sftp://xxx.xxxxxxx.xx/home/user/xxxxxxxxx/out/test.txt'
* About to connect() to xxx.xxxxxxx.xx port 22 (#0)
* Trying yyy.yyy.yyy.yyy... connected
* Connected to venus.indesitcompany.com (yyy.yyy.yyy.yyy) port 22 (#0)
* Failed to read known hosts from /root/.ssh/known_hosts
* SSH host check: 0, key:
AAAAB3NzaC1yc2EAAAADAQABAAAAgQChRq/2MfGP8vf3/x2ZgTsDBmLDHIUmqXMAWoTU0W3nAJwBF71kgTm1Q7ICKc1MYoPRAfT4wlZSySkr+T7aHltOodCAqzJRszbFM0syV2OVxvIN6x0s9YvZx4XFZrbv8gNzA7v9Gsrz9k4Ht+p/wFQ3/Z8z8AyNq8pUY6DsfD+2pw==
* SSH authentication methods available: password,publickey
* Using ssh public key file test_key.pub
* Using ssh private key file test_key
* Initialized SSH public key authentication
* Authentication complete
** Failed to close libssh2 file*
* Closing connection #0
* Failure when receiving data from the peer
curl: (56) Failure when receiving data from the peer
CURL version is the following:
[root_at_firewall ~]# ./curl -V
curl 7.21.2 (i686-redhat-linux-gnu) libcurl/7.21.2 OpenSSL/0.9.8b
zlib/1.2.3 libidn/0.6.5 libssh2/1.2.7
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s
rtsp scp sftp smtp smtps telnet tftp
Features: GSS-Negotiate IDN Largefile NTLM SSL libz
Other tests:
==> directory list works:
[root_at_firewall ~]# ./curl -s -S -f --disable-epsv -vvvv --key test_key
--pubkey test_key.pub -l -u 'userxxx:'
'sftp://xxx.xxxxxxx.xx/home/user/xxxxxxxxx/out/'
* About to connect() to xxx.xxxxxxx.xx port 22 (#0)
* Trying yyy.yyy.yyy.yyy ... connected
* Connected to venus.indesitcompany.com (yyy.yyy.yyy.yyy ) port 22 (#0)
* Failed to read known hosts from /root/.ssh/known_hosts
* SSH host check: 0, key:
AAAAB3NzaC1yc2EAAAADAQABAAAAgQChRq/2MfGP8vf3/x2ZgTsDBmLDHIUmqXMAWoTU0W3nAJwBF71kgTm1Q7ICKc1MYoPRAfT4wlZSySkr+T7aHltOodCAqzJRszbFM0syV2OVxvIN6x0s9YvZx4XFZrbv8gNzA7v9Gsrz9k4Ht+p/wFQ3/Z8z8AyNq8pUY6DsfD+2pw==
* SSH authentication methods available: password,publickey
* Using ssh public key file test_key.pub
* Using ssh private key file test_key
* Initialized SSH public key authentication
* Authentication complete
test.txt
* Connection #0 to host venus.indesitcompany.com left intact
* Closing connection #0
==> OpenSSH sftp client works
[root_at_firewall ~]# sftp -o IdentityFile=test_key userxxx_at_xxx.xxxxxxx.xx
Connecting to xxx.xxxxxxx.xx...
Remote SFTP Server sftp>
sftp> cd out
sftp> get test.txt
Fetching /home/user/userxxx/out/test.txt to test.txt
/home/user/userxxx/out/test.txt
89% 25 0.0KB/s 00:00 ETA
sftp>
Any hint?
-- /Marco D'Ettorre// / *Gruppo**Partners Associates* Tel. Milano +39 02 67380435**- Udine +39 0432 689815 - Roma +39 06 54832300 Fax Milano +39 02 67386214 - Udine +39 0432 570120 - Roma +39 06 91659273 Cell. +39 348 1510674 Email: Marco.Dettorre_at_GruppoPA.it <mailto:Marco.Dettorre_at_GruppoPA.it> Sito: www.GruppoPA.it <http://www.GruppoPA.it> Prima di stampare, pensa all'ambiente ** Think about the environment before printing
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-12-02