# Return to the knowledge base
Category

SSH no matching key exchange method found

Unable to negotiate with x.x.x.x port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1. Are your experiencing this issue as well on older Networking devices?

Here is what you can do:

    • Provide the KEX (Key Exchange Methode) in the ssh command
    • Change your config_ssh to allow permanently a connection to older KEX Algorithms

Provide the KEX (Key Exchange Methode) in the ssh command

ssh -o KexAlgorithms=diffie-hellman-group14-sha1 -o HostKeyAlgorithms=+ssh-rsa [email protected]

Change your config_ssh

sudo nano /etc/ssh/ssh_config

Host *
    KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
    HostKeyAlgorithms +*

ctrl + x to save the new configuration

Would you like a hands-on session?

A couple times a week our in-house trainer is available for a private or group session. In this session we can cover our Slurp'it or Mock'it solution but also integrations with Netpicker, NetBox, Nautobot & Infrahub.

Yes, keep me informed

Connect with us on LinkedIn to stay updated on the latest happenings, news, and exciting developments at Slurp’it. Just click the button below to follow us and be a part of our professional network.

Newsletter