ssh_channel_accept_forward(): No channel request of this type from server

2017-08-03 Thread Nicolas Lykke Iversen
Hi libssh community, I use the client code for direct and reverse port forwarding from the tutorials. This code works perfectly when using an OpenSSH server on Ubuntu 16.10. However, consider the client code for reverse port forwarding, which makes use of the following calls: ssh_channel_listen

How to do remote port forwarding on the server side?

2017-08-02 Thread Nicolas Lykke Iversen
I want to implement remote port forwarding on the server side. Currently, when the client issues ssh_channel_listen_forward() and ssh_channel_accept_forward(), I get the following errors on the client: Error opening remote port: Global request tcpip-forward failed Error reverse port forwarding T

SSH server: Problem with polling of pipes created for reading stdout/stderr of child process using libssh API

2017-07-30 Thread Nicolas Lykke Iversen
or reading on child_stdin or child_stderr, when everything works in the case of a pty (or command-line execution using option -c)? I would be grateful for an explanation. Please, ask for more context/explanation if my description doesn't suffice. Best regards, Nicolas Lykke Iversen

Request for remote command-line SSH server example

2017-07-24 Thread Nicolas Lykke Iversen
Hi libssh-community! I request a SSH server example for connecting with a client to obtain remote command-line execution. Is it necessary to request a PTY or is it enough to request a shell only? Given that a PTY/shell is requested, how do I get a remote command-line? Are their specific function

Re: How do I get the remote address and port of a SSH client connecting to a SSH server?

2017-07-22 Thread Nicolas Lykke Iversen
Thank you Stef, What socket do you use to get the address and port of the client? In what structure is it located? -Nicolas 2017-07-21 15:55 GMT+02:00 Stef Bon : > 2017-07-21 14:11 GMT+02:00 Nicolas Lykke Iversen : > > I've a working SSH client and server written using libssh.

How do I get the remote address and port of a SSH client connecting to a SSH server?

2017-07-21 Thread Nicolas Lykke Iversen
I've a working SSH client and server written using libssh. On the server side, I would like to know the address and port of the client once it has connected. Looking through ssh_bind and ssh_session, I can get the address and port on which the server listens. However, I cannot find any fields to