You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ultram4rine
changed the title
proposal: x/crypto/ssh: return error if other side version is older
x/crypto/ssh: return error if other side version is older
Oct 13, 2021
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux amd64
What did you do?
Dial to an SSH device with SSHv1 on board.
What did you expect to see?
An error which says that SSHv1 and SSHv2 incompatible
What did you see instead?
That error:
ssh: handshake failed: ssh: invalid packet length, packet too large
To get this, in readVersion func, add check like this before return version (it's very close to how paramiko does that):
Also, as I understand, RFC4253, section 5.2 says that client with newer version should close the connection to the older server when it happens.
I try to can send it to Gerrit with a test if you want.
Thanks.
The text was updated successfully, but these errors were encountered: