Open xxorax opened 4 years ago
I'm curious what the use case is for this?
I'm trying to make server management utility with a bastion including recording feature, it may include multi-client views (like tmux or terminator do). It's not well defined yet. For now, bastion and recording using a part of ttyrec are ok but without handling all the cases (x11, port fwd...). And for that I need to understand more when theses events should be accepted or not. It would have been easier and cleaner if I could have just send everything "as-is" to the client and catch what I need: It's what I'm trying do to.
My final goal is to be able to pipe a Session from a ssh2.Server Session to a ssh2.Client (once authenticated). That way I can pipe to multiple Client for example.
For most of the Server Session events, it's easy to map them to a Client method.
However there are few requests that are sent internaly in during
Client.shell()
orClient.exec()
. It's all the todo stack that can call reqAgentFwd, reqPty, reqX11 (same in theshell()
method)In the Server, these events (for example the
pty
event) are associated to a client Session and they can theoricaly be emitted multiple times I guess. But the Client cannot send them multiple time actualy.Also does this mean that only one "real session start" requests should be received by Session ? But it seems the server can handle more than one per Session.
Thanks !