cURL / Mailing Lists / curl-library / Single Mail

curl-library

Why curleasy do nothing for SFTP

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

Hi,

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 = "sftp://user@ftp.xxxx.com/test1.txt";
 curl_easy_setopt(pCurl->mpCurl, CURLOPT_URL, url)
 curl_easy_setopt(pCurl->mpCurl, CURLOPT_USERPWD,
FtpUserPasswd.c_str());
 curl_easy_setopt(pCurl->mpCurl, CURLOPT_SSH_AUTH_TYPES,
CURLSSH_AUTH_KEYBOARD);

The verbose output is given below.
Text: About to connect() to ftp.xxx.com port 22 (#0)
Text: Trying 66.xxx.xxx.50...
Text: connected
Text: Connected to ftp.xxx.com (66.xxx.xxx.50) 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?

Thanks,
Mathew Simon
Received on 2007-08-19