cURL / Mailing Lists / curl-library / Single Mail


Why curleasy do nothing for SFTP

From: Mathew Simon <>
Date: Sun, 19 Aug 2007 13:49:47 -0500


I am trying to make SFTP work for me. From the ssh -dd debug log, I am
inferring that curleasy make the initial connection to the sshd server,
then make no attempts to log-in, simply closes the initial connection,
and then throw out a generic message "Error in the SSH layer".

 String FtpUserPasswd = "user:xxxxx";
 String url = "s";
 curl_easy_setopt(pCurl->mpCurl, CURLOPT_URL, url)
 curl_easy_setopt(pCurl->mpCurl, CURLOPT_USERPWD,
 curl_easy_setopt(pCurl->mpCurl, CURLOPT_SSH_AUTH_TYPES,

The verbose output is given below.
Text: About to connect() to port 22 (#0)
Text: Trying
Text: connected
Text: Connected to ( port 22 (#0)
Text: Closing connection #0
Text: Error in the SSH layer

What is preventing CURL from attempting to take the connection to the
next level or log-in? How can I go from here?

Using the WinSCP SFTP client I am able to connect to this sshd. While
using WinSCP, I got an initial message whether to trust the server's
keys or not. Is LIBCURL stumbling on a similar message?

Mathew Simon
Received on 2007-08-19