cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl SFTP: Failure establishing ssh session

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Wed, 9 May 2012 16:41:15 -0400

On May 9, 2012 4:28 PM, "Marcel Lindenbergh" <marcel_at_wireless-services.nl>
wrote:
>
> Version: curl @7.25.0 / libssh2 @1.2.7
>
> Curl is unable to setup an SFTP connection to all SFTP servers I tried so
far. Running curl in verbose mode gives:
>
> [MacBook~]$ curl --verbose --list-only sftp://127.0.0.1/
> * About to connect() to 127.0.0.1 port 22 (#0)
> * Trying 127.0.0.1...
> * connected
> * Connected to 127.0.0.1 (127.0.0.1) port 22 (#0)
> * Failure establishing ssh session
> * Closing connection #0
> curl: (2) Failure establishing ssh session
>
> HTTPS connections are working fine. I have Googled for days but haven't
found an answer as to why this is happening. Only one person suggested it
might be related to libssh2.
>
> Any ideas as to how I can find out what is happening here and how to
debug this?

Https goes over port 443 normally, while sftp goes over the SSH port, which
is port 22. Is sshd running on the target system?? Is port 22 inbound
being blocked by firewall rules on the target??

Ralph Mitchell

-------------------------------------------------------------------
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 2012-05-09