[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to do remote port forwarding on the server side?


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

The client is the one from the tutorial, and the server is the
ssh_server_fork.c from the examples directory.

Conversely, on the server side (after successful password authentication),
I get:

[Error] ssh_event_dopoll(): Received SSH_MSG_DISCONNECT: 11:Bye Bye

What methods from the library should I use on server side to handle forward
requests? I've looked in the ssh_server_callbacks_struct where the
service_request_function
looked interesting, but that doesn't work.

Could someone explain how to do remote or direct forwarding and (hopefully)
provide a small example?

Thanks,
Nicolas

Archive administrator: postmaster@lists.cynapses.org