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

unable to connect to old cisco switches: Unknown DH Group #9830

Closed
tiagocasalribeiro opened this issue Jul 31, 2024 · 12 comments
Closed

unable to connect to old cisco switches: Unknown DH Group #9830

tiagocasalribeiro opened this issue Jul 31, 2024 · 12 comments
Labels

Comments

@tiagocasalribeiro
Copy link

Problem:
After upgrading to version 1.0.209 I am unable to connect to old switches, with Unknown DH Group. Read somewhere else it is an error related to BoringSSH used by EletronJS, that have dropped support for diffie-hellman-group1-sha1.

To Reproduce:
1 - Upgrade to version 1.0.209 or newer;
2 - Try to connect to an old Cisco switch.

@Eugeny
Copy link
Owner

Eugeny commented Aug 1, 2024

Check out #9810

@tiagocasalribeiro
Copy link
Author

Check out #9810

Tried the nightly, still having the same issue.

@Eugeny
Copy link
Owner

Eugeny commented Aug 1, 2024

have you enabled the diffie-hellman-group1-sha1 kex in the profile settings in the nightly version?

@tiagocasalribeiro
Copy link
Author

have you enabled the diffie-hellman-group1-sha1 kex in the profile settings in the nightly version?

Yes, I did.

@Eugeny
Copy link
Owner

Eugeny commented Aug 3, 2024

Could you please post the output of connection setup log when connecting to the switch with ssh -v?

@tiagocasalribeiro
Copy link
Author

tiagocasalribeiro commented Aug 5, 2024

Could you please post the output of connection setup log when connecting to the switch with ssh -v?

here it is:

PS C:\Users*> ssh -v -oKexAlgorithms=+diffie-hellman-group1-sha1 -c3des-cbc ***********
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug1: Connecting to ******** [
] port 22.
debug1: Connection established.
debug1: identity file C:\Users\/.ssh/id_rsa type 0
debug1: identity file C:\Users\
/.ssh/id_rsa-cert type -1
debug1: identity file C:\Users\/.ssh/id_dsa type -1
debug1: identity file C:\Users\
/.ssh/id_dsa-cert type -1
debug1: identity file C:\Users\/.ssh/id_ecdsa type -1
debug1: identity file C:\Users\
/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\Users\/.ssh/id_ed25519 type -1
debug1: identity file C:\Users\
/.ssh/id_ed25519-cert type -1
debug1: identity file C:\Users\/.ssh/id_xmss type -1
debug1: identity file C:\Users\
/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
debug1: Remote protocol version 2.0, remote software version Cisco-1.25
debug1: match: Cisco-1.25 pat Cisco-1.* compat 0x60000000
debug1: Authenticating to :22 as ''
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group1-sha1
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: 3des-cbc MAC: hmac-sha1 compression: none
debug1: kex: client->server cipher: 3des-cbc MAC: hmac-sha1 compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:
*********
debug1: Host '' is known and matches the RSA host key.
debug1: Found key in C:\Users\
/.ssh/known_hosts:44
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: C:\Users\/.ssh/id_rsa RSA SHA256:
debug1: Will attempt key: C:\Users\/.ssh/id_dsa
debug1: Will attempt key: C:\Users\
/.ssh/id_ecdsa
debug1: Will attempt key: C:\Users\/.ssh/id_ed25519
debug1: Will attempt key: C:\Users\
/.ssh/id_xmss
debug1: SSH2_MSG_SERVICE_ACCEPT received

Banner

debug1: Authentications that can continue: password
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such file or directory
@'s password:

@Eugeny
Copy link
Owner

Eugeny commented Aug 14, 2024

Thanks - a new nightly with 3DES cipher support should be ready soon: https://github.com/Eugeny/tabby/actions/runs/10395680351

GitHub
A terminal for a more modern age. Contribute to Eugeny/tabby development by creating an account on GitHub.

@tiagocasalribeiro
Copy link
Author

tiagocasalribeiro commented Aug 14, 2024

Thanks - a new nightly with 3DES cipher support should be ready soon: https://github.com/Eugeny/tabby/actions/runs/10395680351

GitHub**bumped russh · Eugeny/tabby@c42ea8a**A terminal for a more modern age. Contribute to Eugeny/tabby development by creating an account on GitHub.

Tried this new build, now it only says "disconnect".

@Eugeny
Copy link
Owner

Eugeny commented Aug 23, 2024

I've updated the build to show more detailed error messages - would appreciate if you could give it another try ✌️

@Clem-Fern
Copy link
Contributor

@tiagocasalribeiro just curious, is the command "ip ssh version 2" present on the switch you are trying to connect to ?

I bumped into a similar issue with the experimental build and some old devices without ssh server version 2 by default.

It seems that the old ssh2 lib wasnt bother by the version ssh.

@tiagocasalribeiro
Copy link
Author

tiagocasalribeiro commented Aug 23, 2024

@tiagocasalribeiro just curious, is the command "ip ssh version 2" present on the switch you are trying to connect to ?

I bumped into a similar issue with the experimental build and some old devices without ssh server version 2 by default.

It seems that the old ssh2 lib wasnt bother by the version ssh.

Now I am getting this:
X NoCommonAlgo { kind: Key, ours: ["ecdsa-sha2-nistp256", "ecdsa-sha2-nistp521", "rsa-sha2-256", "rsa-sha2-512"], theirs: ["ssh-rsa"] }

Selecting ssh-rsa on the cyphers pane, I can now connect. Before it worked without it, weird...

Eugeny added a commit that referenced this issue Aug 24, 2024
@Eugeny
Copy link
Owner

Eugeny commented Aug 24, 2024

Thank you! I've added it to the defaults list

@Eugeny Eugeny closed this as completed Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants