Question : Problem: Force single telnet over a SSH tunnle

I let users telnet to my aplication using ssh tunnle. The users use OpenSSH client 3.x as this,

ssh -2 -N -f -L porta:localhost:23 192.168.xxx.xxx
telnet localhost porrta

The server is also an implementation of OpenSSH. My requirement is to force only one telnet over the tunnle that has been created. For example the following currently works,

ssh -2 -N -f -L porta:localhost:23 192.168.xxx.xxx
telnet localhost porrta
---- from another shell
telnet localhost porrta
---- from another shell
telnet localhost porrta

But I want that consequitive telnet should fail. Is there a server setting to acheive this. Any client setting/option to add while creating tunnle will also work for me, as I can force my users to use it.

If nothing else then I am also willing to change the SSH server side code to suit my needs, but I hope that is the last resort.

Thanks.

Answer : Problem: Force single telnet over a SSH tunnle

I have modifie the code and acheived this. Need to send a disconnect message in serverloop.c file when a new channle is created.

BTW how do I close this question. No body gave me any answer :(
Random Solutions  
 
programming4us programming4us