I am using libssh2 library to ssh connections in my mobile application. Here I want to use Agent Forwarding support.
I have followed same procedure as they have provided in example here LibSSH2 Agent Forwarding.
I am able to create agent successfully but when I try to connect it with libssh2_agent_connect(agent) It gives me error -39 LIBSSH2_ERROR_BAD_USE.
Well I am checking same thing using MAC OSX terminal and it's working fine. Please suggest if anything wrong,
What I am doing is:
That means agent forwarding is working fine correct? Please suggest me if anything wrong in above flow. I am very new to ssh sorry if this is obvious.
I am doing same thing with libssh2, making connection with Machine B with same key which copied in machine B. Please suggest am I missing anything using libssh2 lib to forward agent?
Thanks!
LibSSH2 does not currently support agent forwarding. There is an open request for that feature.
The example linked above is for standard SSH agent authentication, sans forwarding.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With