Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Updating ssh protocol to support disconnect message and language in packet#1455

Open
Luwdo wants to merge 2 commits intomscdex:masterfrom
Luwdo:ssh-connection-disconnect-message-option
Open

Updating ssh protocol to support disconnect message and language in packet#1455
Luwdo wants to merge 2 commits intomscdex:masterfrom
Luwdo:ssh-connection-disconnect-message-option

Conversation

Copy link

Luwdo commented Jun 4, 2025

This allows more fine grained control of the disconnect message packet. Allowing custom authentication implementations to communicate to clients the reason for connection failure.

A common pattern that openssh implements is an authentication failure limit. Resulting in the following message:

Received disconnect from 10.99.33.252 port 30372:2: Too many authentication failures
Disconnected from 10.99.33.252 port 30372

ssh2 js can implement this but there was no way to pass back a human readable message or change the reason to PROTOCOL_ERROR: 2 which is most appropriate for a "Too many authentication failures" message.

Fall back is set to reason: BY_APPLICATION so those who do not implement custom authentication exit patterns won't be affected.

...ets. Updating client to allow setting the reason message and language when ending the client.
Luwdo mentioned this pull request Jun 18, 2025
Copy link
Author

Luwdo commented Jul 15, 2025

This is still an issue that is hiding ssh client visibility of messages concerning the reason why a connection was rejected.

Copy link
Owner

mscdex commented Jul 15, 2025

This needs a test.

Copy link
Author

Luwdo commented Jul 16, 2025

This needs a test.

I can work on getting a test added to my PR.

ProTogen11 approved these changes Jul 31, 2025
ProTogen11 previously approved these changes Jul 31, 2025
mscdex dismissed ProTogen11's stale review July 31, 2025 15:58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

ProTogen11 ProTogen11 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants