Hi,

I am using SSH local port forwarding in my application, and I would like to add some redundancy. For example, right now I forward local port 80 through an SSH server, ssh1.example.com, to a target server1.example.com:80. Now, if server1.example.com goes down, I would like to forward to server2.example.com instead.

I am using SSHD for the client and server portions of the connection.

At the moment, I am using a ForwardingFilter on ssh1.example.com to reject forwarding requests if the target server is not reachable. However, there does not seem to be any way for my application to find out from the SSHD client that the channel failed to open.

Is there a way for me to find this out with the current client implementation? If not, I am willing to implement this capability myself and contribute it back to the project. I was thinking of adding a ChannelListener interface that gets called by the session at various points in the channel lifecycle (channelRegistered, channelUnregistered, channelOpened, etc.). Does this seem like a reasonable design? If not, does anyone have any recommendations for how this functionality could be achieved?

Thanks,
Kevin

Reply via email to