I am trying to create a central authentication gateway (sshd program) that listens on port 22, accepts client connections and after authenticating through password/publickey authentication, transparently proxies connection to another ssh server (target server).
target server is standard ssh server (noting to do with mina sshd). The purpose is to provider central authentication for all users and then connect them to appropriate server belonging to them. For end users it should all be transparent. They authenticate and are connected to a target server (which is different from authentication server) as if they are directly connected to that target server. Went through source code (of apache mina sshd and did fair bit of googling) but it doesn't have much comments / docs and it is difficult to come out with a clear cut way of implementing this functionality using mina/sshd. Should I write a custom implementation of SessionChannel (which opens connection to target server and connects the streams)? Can anybody provide any pointers/help? Thanks for providing this excellent library for ssh/network heavy lifting in java. SZ