Skip to content

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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Luwdo
Copy link

@Luwdo 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.
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.

1 participant