curl / Mailing Lists / curl-users / Single Mail


Re: Curl: (2) Failure establishing ssh session

From: Ray Satiro via curl-users <>
Date: Sat, 1 Jul 2017 02:43:58 -0400

On 6/29/2017 2:57 AM, Curly Watson via curl-users wrote:
> curl -v -uUsername: --key ~/.ssh/id_rsa --pubkey ~/.ssh/id_rsa -x
> socks5h://ProxyAdd:1080 s
> <>
> This is getting Failure establishing ssh session
> Can you help sort this error pls.

What's your curl -V? That error is failed init and occurs when libsh2
startup fails [1]. According to the function there are a number of
reasons it can fail [2] like key exchange etc. As far as I can tell we
don't show the reason it fails. I think we should in verbose mode at
least like
failf(data, "Failure establishing ssh session, error %d", rc);
It looks like you'll have to make such a modification to figure out why
it's failing, unless someone else has a better idea...


Received on 2017-07-01