Multiple Reverse SSH Tunnels using Single Port

Solution 1:

I have the same issue you do and, by the time, have only arrived at one possible answer. My scenario is a bit different than yours as I only need one active ssh tunnel, but all clients must be ready to connect if needed.

I guess one could create a client/server simple protocol to handle all the clients and create a list of some sort. The user then could chose one of the clients to create the reverse tunnel. Doing that would require another open port rather than the ssh server, but using a threaded server one could listen() to various clients under the same port for this secondary protocol.

I'm still working on a solution (I'll probably implement what I just wrote), but mind you in your case you should decide the max number of clients connected at a single time and configure that amount of ports. As mine is just a small linux "support" for embedded devices, I can only work on one device at a time anyway, so I only need 1 device.

A cleverer idea would be to inform the client over the aux protocol at which server port to attach the reverse tunnel.