curl-users
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/
> <http://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 [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...
[1]: https://github.com/curl/curl/blob/curl-7_54_1/lib/ssh.c#L740
[2]: https://www.libssh2.org/libssh2_session_startup.html
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-07-01