mirror of
https://github.com/ovh/the-bastion.git
synced 2026-05-09 08:25:27 +02:00
[GH-ISSUE #96] No matching key exchange method found #24
Labels
No labels
answered
bug
documentation
enhancement
enhancement
feature
feature
kept-open-for-info
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/the-bastion#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dwydler on GitHub (Dec 15, 2020).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/96
Hi guys,
today i have no bug report. It is more technical question. We want to manage access to CISCO switches with Bastion.
First i tried to connect from the bash with the command ssh:
ssh netadmin@192.168.1.1But i got follow error message:
Unable to negotiate with 192.168.1.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1With a look into the file /etc/sshd/sshd_config showed me, that with the installation of the bastion, some changes have been done.
I do some changes in the configuration file to find a solution for the error - without success.
Occurs the problem by hardening the ssh daemon or it's a default setting from the ssh daemon on Ubuntu 20.04 LTS?
Regards,
Daniel
@speed47 commented on GitHub (Dec 16, 2020):
Hello @dwydler,
We do manage access to such switches using The Bastion too, and indeed, depending on the models and firmware revision of the switches/routers, sometimes the available ciphers or key exchange methods are "old", and by default they're disabled on the egress side of the bastion, that is, in the
/etc/ssh/ssh_configfile, because they're less secure.You can directly add such mechanisms to the
KexAlgorithmsoption of the/etc/ssh/ssh_configfile on the bastion. In your case, this would be something like this:KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1Of course this is just an example, it depends which cryptographic suites you want, depending on your cryptography policy (the complete list is in
man ssh_config).You might have to lower the ciphers and the MACs also, depending on the network device.
@dwydler commented on GitHub (Dec 17, 2020):
Hi @speed47,
Argh! I edited the wrong file. :-( Thanks for the food for thought.
I have done the same changes on
/etc/ssh/ssh_config. After that we could connect to the switches successfully.Here the additions:
KexAlgorithms: +diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
Chipers: +aes128-cbc
Regards,
Daniel