cURL / Mailing Lists / curl-users / Single Mail


curl using SSH issues

From: Abu-Rashid, Ebrahim <>
Date: Thu, 11 Oct 2007 13:07:27 -0400


I am trying to use cURL with ssh2 for sftp sessions; every time I try to
execute the program I seem to get the error


 curl: (2) Failure initialising sftp session


here is what I have for cURL on my Solaris 9 server.


curl 7.17.0 (sparc-sun-solaris2.9) libcurl/7.17.0 OpenSSL/0.9.8e
zlib/1.2.3 libssh2/0.17

Protocols: tftp ftp telnet dict ldap http file https ftps scp sftp

Features: IPv6 Largefile NTLM SSL libz


The command and command line options that I use are as follow:


curl -sS -n -m 7 --disable-epsv --user userXXX:123456 --key
/export/home/user/.ssh/sftpkey sftp:// -T test_me
--trace trace


and below is the trace file:

== Info: About to connect() to port 12345 (#0)

== Info: Trying == Info: connected

== Info: Connected to ( port 123456 (#0)

== Info: SSH authentication methods available: publickey,password

== Info: Using ssh public key file /export/home/curltest/.ssh/

== Info: Using ssh private key file /export/home/curltest/.ssh/key

== Info: Initialized password authentication

== Info: Authentication complete

== Info: Failure initialising sftp session


== Info: Closing connection #0



Any Help would be greatly appreciated.


Thank you


Received on 2007-10-11