Hello, I would like to use libssh for connecting to a remote host via a gateway, executing a command on the remote host and parsing its standard outputs/errors; So the picture is localhost -> gateway -> remote
I'm pretty new with libssh. I used to do that with command line ssh by specifying ssh -o ProxyCommand='ssh -W %h:%p mylogin@gateway' mylogin@remote mycommand It is not obvious to me how to do that with libssh; One track I have in mind is a variant of the above with : ssh -L 9999:remote:22 mylogin@gateway ssh -p 9999 mylogin@localhost mycommand therefore I would establish a tunnel then create a new libssh session on localhost and execute the command in a channel on this new session. I'm wondering if this is the right track to follow from implementing in libssh this bounce over a proxy. Thank you for your help. Jeremy.