Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.8.0
-
None
-
n/a
Description
In wading through the SSH sources I've been having some trouble trying to understand how the code base implements RFC4254 (ssh-connection). For the most part the ssh-connection protocol is symmetric - either and can initiate any request - but the code doesn't reflect this.
As an example, SSH_MSG_CHANNEL_OPEN requests such as "direct-tcpip". Since the protocol is symmetric, both the ssh-client and ssh-server are allowed to initiate the request yet the code is structured to strongly (and confusingly) imply it is always ssh-client to ssh-server.
For instance, ChannelDirectTcpip classes exist in both ...sshd.server.channel and ...sshd.client.channel, suggesting one is ssh-server only and the other is ssh-client only, which isn't true.
Can I suggest, long term, looking at moving all the connection code to somewhere more neutral such as:
sshd.connection.channel.DirectTcpipChannel
say. It would also make a good first step towards separating the code implementing the ssh-connection protocol from the lower-level ssh-client and ssh-server.