Re: Curl: (2) Failure establishing ssh session
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 sftp://test.com/Reports/
> 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 . According to the function there are a number of
reasons it can fail  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
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...