I would like to identify the username in an incoming SSH connection and pass it on to a Lua script. Then from that Lua script I can decide what backend to route that connection to.
For example someone may connect using:
HA Proxy will provide the Lua script with the username part
averyniceusername and through whatever logic will decide that the backend server this connection should be directed at is
192.168.0.123. Or do I need to parse out the username from within the Lua script?
Is any of what I am suggesting possible?