0

i am trying to user X11 forwarding with libssh. Because i have not found good examples for doing so, can anyone give me some example how to use X11 with libssh?

Thanks!

Philipp H.
  • 1,513
  • 3
  • 17
  • 31
  • hi, did you find a working solution using libssh or libssh2? i filled an issue in libssh2 github account. I can't manage to get the sample code work. https://github.com/libssh2/libssh2/issues/201 – Indio Jul 26 '17 at 07:15

2 Answers2

0

Did you read the tutorial with code examples?

http://api.libssh.org/master/libssh_tutor_forwarding.html

asn
  • 798
  • 9
  • 17
  • That could be an option to use the direct or inderect forewarding instead of the x11 functions in libssh. My problem still is, how can i pass the local x11 server the incomming data from the tunnel. And the other way, how can i read from the local x11 server data to pass through the ssh channel? – Philipp H. Jan 01 '13 at 15:26
0

I too was trying to get X11 working with libssh but had no success. I was only able to push through regular cmds that didn't require a GUI.

If java is an option for you I would recommend the Java Secure Channel library. Documentation isn't so good but there's an examples folder with X11 code that really helped me. It worked great with xming.

http://www.jcraft.com/jsch/

Son-Huy Pham
  • 1,899
  • 18
  • 19
  • Well, I read the documentation, but had no success. A running example for me would be very nice. Java is not an option for me. Another option could be using another libssh library. Does anyone know a such library with an easy X11 forewarding example? – Philipp H. Dec 25 '12 at 14:49
  • I went ahead and submitted a issue/bug in their bug tracking system: https://red.libssh.org/issues/100 I do hope for both yours and my own sake that they'll resolve it. If you're on linux machine, you should instead take a look at libssh2. http://www.libssh2.org/ I haven't tried it out but i did download and take a look at their example. the C API is somewhat similar. – Son-Huy Pham Jan 04 '13 at 11:37