rapier1/hpn-ssh

HPN banner exchanged

ej-nelson opened this issue · 3 comments

I am trying to run some tests and notice that my two instances weren't recognizing they both had the HPN patches. During the handshake they exchange banners, but the banners don't have the additional 'hpn' string needed. It appears in the kex_exchange_identfication() fucntion, in kex.c, only SSH_VERSION constant is placed into the banner and not SSH_PORTABLE, or SSH_HPN constants.

Pasting in the diff output didn't work.

if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%.100s%s%s\r\n" PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION,
This appears to fix it.
if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%.100s%s%s%s%s\r\n", PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION, SSH_PORTABLE, SSH_HPN,

Another banner is built in ssh_api.c, in the ssh_packet_next() function. This doesn't appear to be called in setting up a connection.

I haven't tested the rpm's in SourceForge to see if the banner exchange is happening with that code.

Hey, I'm sorry I didn't reply earlier. This has been fixed in 8.3. I'll check the older versions to make sure it's there as well.
Basically I changed SSH_VERSION to SSH_RELEASE which is a concatenation of SSH_VERSION SSH_PORTABLE and SSH_HPN.

Turns out that it wasn't in 8.0 so that's fixed. Let me know if you are still seeing any issues. If the connection is HPN aware you should see the line "Remote is HPN Enabled" in the debug lines with ssh -v after the banner exchange.