Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send the client key exchange init in Connect #1274

Merged
merged 3 commits into from
Dec 21, 2023

Conversation

Rob-Hague
Copy link
Collaborator

After discussion in #972, I have been running this in production against several different servers for a week or so.

An example key exchange with this change:

image

And an example when the server init comes in first:

image

cc @geoffstewart

@WojciechNagorski
Copy link
Collaborator

I will check this next week.

@Rob-Hague
Copy link
Collaborator Author

@BoronBGP @expyram perhaps you could test this on a cisco device? Bonus points for pasting the packet trace

@WojciechNagorski
Copy link
Collaborator

Can we prepare tests to cover two cases? When does server initialization occur and when does it not?

@Rob-Hague
Copy link
Collaborator Author

Rob-Hague commented Dec 20, 2023

Added a unit test for when the server does not send kexinit

edit:

When does server initialization occur and when does it not?

The RFC says "Key exchange (kex) begins by each side sending name-lists of supported algorithms." I.e. there is no indication that the client or server should wait for the other.

SSH.NET currently waits for the server to send its supported algorithms. This works OK against most server implementations, but if the server is waiting for SSH.NET, then we have a problem.

@WojciechNagorski WojciechNagorski added this to the 2023.0.1 milestone Dec 21, 2023
Copy link
Collaborator

@WojciechNagorski WojciechNagorski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@WojciechNagorski
Copy link
Collaborator

The 2023.0.1 version has been released to Nuget: https://www.nuget.org/packages/SSH.NET/2023.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants