-
Notifications
You must be signed in to change notification settings - Fork 665
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
"Invalid identification string” error #1118
Comments
Ran into this same issue today when attempting a connection known to work under earlier versions of this module (pre 1.0).
That being said, I'd expect this library to log the ident to the debug handler/callback before raising this kind of error, because currently in order to actually see the ident in question I've had to use a downgraded version of the library. (After downgrading and turning on debug logging, I got:)
The OpenSSH CLI client appears to not bother trying to distinguish between the https://github.com/openssh/openssh-portable/blob/V_8_9_P1/ssh_api.c#L383 For this particular server, OpenSSH logs:
|
…ng ident information. There is a scenario where some SSH servers return an ident of 'SSH-2.0-' which leads to the throwing of an 'Invalid identification string' exception. This commit addresses compatibility for this scenario.
There is an old switch I can ssh by MobaXterm or ssh client in Windows. But when I use ssh2 lib to connect, below error occurs:
After added some debug code to Protocol.js , I found the identification string from the switch might not match standard well:
so I bypass the throwing exception by changing code as below and then the script works as expected
I guess the root cause shoud be the switch's bug, but is it possible to be compatible with this case like MobaXterm?
FYI: the identificatin output when run "ssh -vvv [user]@[IP]" from Windows CMD:
The text was updated successfully, but these errors were encountered: